Hey all,
I have a page full off stuff like
[TITLE]
A Title Here
[/TITLE]
etc., and I'm trying to split them into $PAGE["TITLE"], where TITLE is replace with whatever's in the tag above.
I have the following:
if (preg_match("|\[$item\]\n(.*)\n\[\/$item\]|i", $contents, $results)) {
$PAGE[$item] = $results[0];
} else {
echo "\n\n<BR><BR>ERROR: $item missing from page<BR><BR>\n\n";
}
(hope that hasn't been screwed up cos of the page width!), but it always returns the error!
$contents contains the whoe file full of [TITLE], [AUTHOR] etc. and I'm baffled!
Hope someone can help,
Danny