http://linuxformat.co.uk/wiki/index.php ... _extension
Anyway, I ended up with this code:
Code: Select all
ob_start();
echo "stuff to go in document";
$htmlContents = ob_get_contents();
ob_clean();
$tidy = new tidy('');
$tidy->parseString($htmlContents);
$tidy->cleanRepair();
echo $tidy;
ob_end_flush();So my questions are:
a) Is this the right way to go about it? Is there something more efficient / simpler? Or is it just plain wrong?
b) How do I change the settings with this or the better way of doing it? (Point me to a guide if relevant).