在PHP中,我如何转换:
$result = "abdcef";
转换成一个数组,这个数组应该是:
$result[0] = a;
$result[1] = b;
$result[2] = c;
$result[3] = d;
编辑过
$result = [];
for ( $i = 0; $i < mb_strlen( $string ); ++ $i ) {
$result[] = mb_substr( $string, $i, 1, 'UTF-8' );
}
var_dump($result);