Looking for a simple string divider function?
| From: | Dave VanAuken | Date: | Thu, 21 Dec 2000 00:52:00 +0000 |
| Subject: | Looking for a simple string divider function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31348@lists.php.net to get a copy of this message | ||
(must have digitally signed the last one by mistake)
Have seen some permutations of this type of code... this is similar to
parsing an XML document but i don't need anything that complex.
Have a string of text (from a file)
|StartItem|
blah blah blah blah
|EndItem|
|StartItem|
blah blah blah blah
|EndItem|
|StartItem|
blah blah blah blah
|EndItem|
would like to do a call to a function with this string and get an array
returned with the items...
function StringDivide($FileContents) {
while {
$returnArray = the first "blah blah blah blah"
}
return $returnArray
}
Am working on this now, but would appreciate any code input if anyone has
a simple function already available.
Dave