<?php $str="abcd"; var_dump( str_split($str)); var_dump( str_split($str,2)); // 分解数を指定 ?> ●実行結果 array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" } array(2) { [0]=> string(2) "ab" [1]=> string(2) "cd" }