I am currently using the PHP DOM to get the BODY tag from HTML.
$doc = new DOMDocument();
$doc->loadHTML($HTML);
$body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $HTML);
The above code completely gives me the html from the body tag for a given HTML.
Can I get the HTML tags with $body
as an array?