2015-08-09 56 views

回答

0

这可以通过substr函数完成。以下是代码的工作示例。

http://sugunan.net/demo/substr.php

<?php 
$full_str = "Hello, this is my subject and how are you"; 
$firstn = substr ($full_str , 0 ,10); 
echo $firstn; 
?>