As of PHP 5.4 and Libxml 2.6, there is currently simpler approach:
when you load html as this
$html->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
in the output, there will be no doctype, html or body tags
As of PHP 5.4 and Libxml 2.6, there is currently simpler approach:
when you load html as this
$html->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
in the output, there will be no doctype, html or body tags