HTML Tidy with PHP5

By Deane Barker on April 4, 2004

Tidying up your HTML with PHP 5: The next version of PHP includes an extension for HTML Tidy, so you can have every HTML document perfectly formatted on its way out the door by applying HTML Tidy to the output buffer.

When the Tidy extension is installed, it can be automatically applied to every PHP document output by setting the tidy.clean_output php.ini directive to true. Tidy can also be specified as the output handler when output buffering is enabled, by passing the “ob_tidyhandler” string anywhere the ob_start() function…

Anal retentive developers rejoice!