php普通话汉字字符转数组

1        //汉字字符转数组
2      function chStrToArray($str){
3         $length = mb_strlen($str, 'utf-8');
4         $array = array();
5         for ($i=0; $i<$length; $i++)
6             $array[] = mb_substr($str, $i, 1, 'utf-8');
7         return $array;
8     }

www.5929.com,php普通话汉字字符转数组。php普通话汉字字符转数组。 

Leave a Comment.