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://myzitong.com/article/gjdioh.html