.*?<\/carousel>/s', $content, $matches); if (count($matches) > 0) { preg_match('/<[^\/].*?>/s', $matches[0], $tags); foreach ($tags as $tag) { preg_match_all('/([^\r\n\t\f\v<>= \'"]+)(?:=(["\'])?((?:.(?!\2?\s+(?:\S+)=|\2))+[^>])\2?)?/', $tag, $attributes); if (count($attributes) > 0) { $tagName = $attributes[1][0]; $tagAttribs = array(); for ($i = 1; $i < count($attributes[1]); $i++) { $value = $attributes[3][$i]; if (strlen($value) == 0) { $value = true; } $tagAttribs[$attributes[1][$i]] = $value; } $core->syntaxRender($renderer, $tagName, '', $tagAttribs); } } echo '
'; echo $renderer->doc; echo ''; } else { die('No carousels where found on the page'); } } else { die('No page id was set in the url'); } /*