I was wondering whether there is class or something similar which I can include into my PHP pages to beautify the HTML output.
Such as putting new lines in after tags and correctly indenting so that my source code isn't only one line, I know that to the browser it doesn't matter but I wish to do this.
I have heard of http://www.php.net/manual/en/book.tidy.php but am not clear on what it does and how to implement it, i.e. I don't understand what the manual says about it.
The Tidy
extension is the way to go.
If you don't understand the documentation (OK, admittedly it's not very thorough), then the first results on Google for php tidy tutorials
look very promising:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With