/si"; $repl[] = ''; $reg[] = "/<\/span>/si"; $repl[] = ''; $text = preg_replace( $reg, $repl, $text ); // Clean up variables unset($reg, $repl); return $text; } function _addscript($url, &$text) { // The method depends on event type. onAfterRender is complex and others are simple based on framework if ($this->event!='onAfterRender') $this->document->addScript($url); else { // Get header $reg = "/(
]*>)(.*?)(<\/HEAD>)(.*)/si"; $count = preg_match_all($reg,$text,$html); if ($count>0) { $head=$html[2][0]; } else { $head=''; } // clean browser if statements $reg = "//si"; $head = preg_replace($reg, '', $head); // define scripts regex $reg = '/