PHP-HTMLifier is a library I wrote to construct HTML pages from PHP objects. It handles opening and closing tags, so page-building code doesn't need to mix HTML with repeated echo statements. I used it in the electronics tutorial website.

Consider the following example PHP file (from the PHP website):

<html>
  <head>
    <title>PHP Test</title>
  </head>
  <body>
    <p><?php echo 'Hello World'; ?></p>
  </body>
</html>

Now we make the same page with PHP-HTMLifier...

<?php
$page = new Page('PHP Test');
$page->p('Hello World');

That's all there is to it.

The library was useful for building repeated page elements and keeping their structure in one place.