Page 1 of 1

Illustrating a new line as a delimiter?

Posted: Thu Apr 23, 2009 9:59 pm
by ldexterldesign
Hey people,

Space as a delimiter I'm down with:

Code: Select all

$var = 'Reading Birmingham London Brighton Leeds Liverpool Cambridge'
 
        $contents = explode([b]'  '[/b], $contents);
 
How would I represent the new lines as a delimiter? (I'm pulling the list in as a varible from another file via an include function you see:

Code: Select all

Reading
Birmingham
London
Brighton
Leeds
Liverpool
Cambridge
 
        $contents = explode([b]' ??? '[/b], $contents);
 
Thanks,
L

Re: Illustrating a new line as a delimiter?

Posted: Thu Apr 23, 2009 10:10 pm
by ldexterldesign
Looks like I just found the answer to my own question (eventually!): http://is.gd/ucRe