-
Format HTML
Hey does anyone know of a way to format HTML correcly
I have
Code:
<b>This</b> is a<b> test <u></b>document</u> that will be <b>displayed </b>via <u><b>PHP</u></b>
and want it formatted like
Code:
<b>This</b> is a <b>test</b> <u>document</u> that will be <b>displayed</b> via <b><u>PHP</u></b>
Any ideas?
Thanks
-
Re: Format HTML
You need the HTML tidy extension http://uk2.php.net/tidy ;)
What tidy won't do is clean up badly formed HTML, as it can be somewhat ambiguous. You can hwoever get it to scan a file (or string) and output all the erros found.