In PHP, how do I convert:
$result = "abdcef";
into an array that\'s:
$result[0] = a;
$result[1] = b;
$result[2] = c;
best you should go for "str_split()", if there is need to manual Or basic programming,
$string = "abcdef";
$resultArr = [];
$strLength = strlen($string);
for ($i = 0; $i < $strLength; $i++) {
$resultArr[$i] = $string[$i];
}
print_r($resultArr);
Output:
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
[5] => f
)