中英文混合字符串统计:
int iconv_strlen ( string$str [, string$charset= ini_set(“iconv.internal_encoding”) ] )
1
2
3
4
5
6
|
<?php $s = "中文English" ; echo iconv_strlen( $s , 'utf-8' ); //out:9 ?> |
中英文混合字符串统计:
int iconv_strlen ( string$str [, string$charset= ini_set(“iconv.internal_encoding”) ] )
1
2
3
4
5
6
|
<?php $s = "中文English" ; echo iconv_strlen( $s , 'utf-8' ); //out:9 ?> |