Code: Select all
$doc = new DOMDocument();
$doc->loadHTMLFile('index.tpl.php');
/* do some DOM stuff with it */
...
echo $doc->saveHTML();
<html><head><title></title></head><body>....</body></html>
This is very inconvenient when I have to debug my HTML-source, does anyone know how I can get it to output it in a "normal" way,
where each tag is on a new line?