phpHtmllib is a set of PHP classes and library functions to help facilitate building, debugging, and rendering of HTML and XHTML. It provides a mechanism to output perfectly
indented/readable HTML/XHTML source, and a programmatic API to generating HTML/XHTML on the fly.
<?php //Check out the new PHP HTML/XHTML library classes
//at http://phphtmllib.sourceforge.net