PHP中英文混合无乱码截取
$length){ $str=''; $len=$start+$length; $i = $start; while($i<$len){ if(ord(substr($string, $i, 1))>=128){ $str.=substr($string, $i, 3); $i = $i+ 3; }else{ $str.=substr($string, $i, 1); $i ++; } } return $str; }else{ return $string; } }
文章标题:PHP中英文混合无乱码截取
链接分享:http://ybzwz.com/article/gjdioh.html