PDA

View Full Version : exploding line spacing


AN-net
11-20-2004, 10:11 PM
how would i make text that has a new line for item be exploded into an array

say like:
Apple
Peach
Pear
Tangerine

how would i make it so it explodes the line space and makes it into an array?

Andreas
11-21-2004, 12:32 AM
Depends on the system if the new line is indicated by CR, CR/LF or LF.

You could try $array = explode("\n", $string);