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