Page 1 of 1

Explode function question

Posted: Sun Apr 06, 2008 11:30 pm
by vodius
Hi all,
I'm trying to explode block of text to run some function on it, but I have to explode it by ' ' (space) OR by '<br>' (line break)
I guess there is no way to specify OR in the explode function itself, so it would have to be multystep process.
Please help,
Thanks

Example of text to be exploded by ' ' and by '<br>':
Hello world
how are you

Should return array['Hello','world','how','are','you']

Thanks

Re: Explode function question

Posted: Mon Apr 07, 2008 12:25 am
by Christopher
Show us your code. There are several functions that split strings.

Re: Explode function question

Posted: Mon Apr 07, 2008 1:33 am
by vodius
Thanks for the reply, I actually figured it out, I replaced "<br />" with " <br /> " and then ran explode for " "...
Thanks for reply though.