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.
A set of PHP classes and library functions to help facilitate building, debugging, and rendering of XML, HTML, XHTML, WAP/WML Documents, and SVG (Scalable Vector Graphics)
images as well as complex html 'widgets' .