Split a paragraph of text using PHP

I need to split a paragraph of text by the "new line characters" into an array, how can i do this?

implode('\n', $text);
into an array?
explode("\n", $text);
yes explode
and '\n' doesnt work
No it doesnt
the correct answer is to split on a pattern of \n or \r\n + whatever the mac oldschool is, if you want to handle all for
mats

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: