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