Originally Posted by kbluhm
The OP specifically emphasized wanting a PHP
This will strip all comments, but exclude thise that begin with <!--[
$html = preg_replace( '/\<\!\-\-[^\.*\-\-\>/Us', '', $html );
This seems to be what I'm looking for, but how do I implement it as a function? PHP n00b here.