In PHP, how do i convert:
$result = abdcef;
into an array that's:
$result[0] = a;
$result[1] = b;
$result[2] = c;
$result[3] = d;
In PHP, how do i convert:
$result = abdcef;
into an array that's:
$result[0] = a;
$result[1] = b;
$result[2] = c;
$result[3] = d;
You can use the str_split() function:
If you wish to divide the string into array values of different amounts you can specify the second parameter:
The above will split your string into an array in chunks of two.