Stanley Banned Jun 24, 2006 3,399 43 0 San Diego Nov 16, 2007 #1 Is there a built in php function for splitting paragraphs of text into individual lines and into an array? or is preg_match the only way of doing it?
Is there a built in php function for splitting paragraphs of text into individual lines and into an array? or is preg_match the only way of doing it?
Icecube Up 24h/day Mar 14, 2007 1,169 9 0 Europe Nov 16, 2007 #2 have a look at PHP: explode - Manual it should work if you explode by " " ---> New Line ( or \n)
Stanley Banned Jun 24, 2006 3,399 43 0 San Diego Nov 16, 2007 #3 nope, explode doesn't do it preg_split seems to work okay though preg_split('/[\n\r]+/',$string)