本文实例讲述了php简单截取字符串的方法。分享给大家供大家参考,具体如下:
//截取摘要
public static function mbsubstr($str){
$strleng = mb_strlen($str,"utf8");
$mbstr = mb_substr($str,0,140,'utf8');
$strdstr = mb_substr($str,140,$strleng,'utf8');
$strlengs = mb_strlen($strdstr,'utf8');
$strc = "";
for($i=0;$i
页:
[1]