[Help] how to split a Chinese string into a single character PHPcode $ county & quot; Greater China & quot; echo & quot; & lt; fontcolorred & gt; & quot ;. $ ciiconv_strlen ($ county, & quot; UTF-8 & quot ;). & quot; & lt; font & gt; & quot; f [help] how to split a Chinese string into a single character
PHP code
$ County = "Greater China"; echo "". $ ci = iconv_strlen ($ county, "UTF-8 "). ""; for ($ j = 0; $ j <$ ci; $ j ++) {echo $ e. = iconv_substr ($ county, $ j, $ j );}
------ Solution --------------------
PHP code
------ Solution --------------------
PHP code
Greater China [User: root Time: 19: 21: 36 Path:/home/liangdong/php] $ cat mb. php
------ Solution --------------------
PHP code
$ County = "Greater China"; $ array = str_split ($ county, 2 );
------ Solution --------------------
Discussion
PHP code
$ County = "Greater China ";
$ Array = str_split ($ county, 2 );
Array (4 ){
[0] =>
String (2) "large"
[1] =>
String (2) "medium"
[2] =>
String (2) "Hua"
[3] =>
String (2) "zone"
}