$length || ($i+1) == $str_length) { $results[] = $tmp_str; $tmp_str = ''; $tmp_str_length = 0; } } return $results;}$a = '截取的变量是宽度width而不是长度length。';$length = 10;print_r(utf8_str_split($a,$length));
本文共 298 字,大约阅读时间需要 1 分钟。
$length || ($i+1) == $str_length) { $results[] = $tmp_str; $tmp_str = ''; $tmp_str_length = 0; } } return $results;}$a = '截取的变量是宽度width而不是长度length。';$length = 10;print_r(utf8_str_split($a,$length));
转载于:https://www.cnblogs.com/buexplain/p/4731919.html