Oops. I forgot some other built-in PHP functions.
I think it's more feasible to use chunk_split(). (You can take a look
at wordwrap() function too but I'd advice chunk_split(). Also
chunk_split() should work much faster than any other function we wrote
by using PHP.)
Regards.