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_su... ...
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 }