Splitting string
| From: | Steven Macintyre | Date: | Sun, 10 Dec 2006 08:41:43 +0000 |
| Subject: | Splitting string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-245684@lists.php.net to get a copy of this message | ||
Hello,
(a) I don't have php 5 :)
(b) I have tried to use a < php 5 snippet from manual to no success ...
I have a string like such ... "word another word
yet another"
Now ... from word to another word (excluding another word, including word)
is 50 chars ... and the same fro another word to yet another ...
I need to split this string and get those three "fields"
I manage to get the first section right ...
Example of string;
$string = "EVOLUTION DEAR GOD
BOYZ_II_MEN ";
Will someone be able to assist me?
I cannot strip spaces as some of the "words" will be double ... ie "Dear
God" etc
Kind Regards,
Steven Macintyre
http://steven.macintyre.name
--
http://www.friends4friends.co.za