How do I split a string in PHP?

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Guest
I need to split a string in php. I want it to split it every 5 char and put the fragments in an array.

for example if I splited the phrase above I want it to look like:

I nee
d to
split

and so. I want also the last fragment of the string. It will probably be shorter than 5 char.
 
Back
Top