PHP: Split string into array, like explode with no delimiter?

Str_split also takes a 2nd param, the chunk length, so you can do things like.

$array = str_split("0123456789bcdfghjkmnpqrstvwxyz"); str_split also takes a 2nd param, the chunk length, so you can do things like: $array = str_split("aabbccdd",2); // $array0 = aa // $array1 = bb // $array2 = cc etc ... You can also get at parts of your string by treating it as an array: $string = "hello"; echo $string1; // outputs "e.

Ah. Missed that function, was splitting binary numbers to becalculated in an array, this works well. – oni-kun Jan 31 '10 at 2:42.

You can access characters in a string just like an array $s = 'abcd'; echo $s0; prints 'a.

Str_split can do the trick. Note that strings in PHP can be accessed just like a chars array, in most cases, you won't need to split your string into a "new" array.

That's really unnecessary, and quite a bit slower then str_split. – Erik Jan 31 '10 at 2:37.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions