PHP中英文字符串截取函数无乱码(mb_substr)和获取中英文字符串字数函数(mb_strlen)
mb_substr( $str, $start, $length, $encoding ) $str,需要截断的字符串 $start,截断开始处,起始处为0 $length,要截取的字数 $encoding,网页编码,如utf-8,GB2312,GBK ================================== mb_strlen( $str, $encoding ) $str,要计算长度的字符串 $encoding,网页编码,如utf-8,GB2312,GBK