Split a String Into Array Without Delimiter

Following advice from StackOverflow.
$ php -a

php > print_r(str_split('foobar', 1));
Array
(
[0] => f
[1] => o
[2] => o
[3] => b
[4] => a
[5] => r
)

No comments:

Post a Comment