$warn = '<p class="warn">[[warn]]</p>';
if ($offset = strpos($doc, '</h2>')) {
$doc = substr_replace($doc, "\n\n".$warn, $offset + 5, 0);
$warn = '<p class="warn">[[warn]]</p>';
if ($offset = strpos($doc, '</h2>')) {
$doc = substr_replace($doc, "\n\n".$warn, $offset + 5, 0);