The object is to find sets such as <!-- content:start -->some content here<!-- content:stop -->
and process each one to put it into an array, but every time it find no matches and echos my die statement without printing any matches out. This is the current function that is being executed.
function boom($data) {
$number = preg_match_all("/(<!-- ([\w]+):start -->)(.*?)(<!-- \\2:stop -->)/", $data, $matches, PREG_SET_ORDER);
if ($number == 0) $data['content'] = $data;
//else unset($data);
foreach ($matches as $item) print_r($item)."\n\n"; // $data[$item[2]] = explode("<!-- breaker -->", $item[3]);
die("<code>".str_replace("\n", "<br />", htmlentities($data))."</code>");
return $data;
}
You can see what is being outputted here.