echo $tpl->result['main'];
function minify_html(&$buffer) { $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(?![^<]*noindex)(.*?)-->/"); $replace = array(">", "<", "\\1", ""); $buffer = preg_replace($search, $replace, $buffer); } minify_html($tpl->result['main']);
function minify_html($buffer) { $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(?![^<]*noindex)(.*?)-->/"); $replace = array(">", "<", "\\1", ""); $buffer = preg_replace($search, $replace, $buffer); return $buffer; }
ob_start("minify_html"); echo $tpl->result["main"]; ob_end_flush();
{catnewscount id="X"}
clear_cache( array( 'news_', 'comm_'.$post_id, $cprefix ) );