2015-08-09 157 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; 
?>