title: PHP - Looking for an HTML Generator/Manager
body: <p>I'm trying to find a tool that I can use to generate markup programatically (non-irl word). Here is an example of what I'm trying to accomplish in pseudo-code...</p>
  
  <pre><code>$htmlDoc = new HTML_Document();
  
  $htmlDoc-&gt;setTitle('Cool Title');
  
  $htmlDoc-&gt;addJs('some_js_file.js');
  $htmlDoc-&gt;addStylesheet('some_css_file.css');
  
  $divElement = new HTML_Element_Div();
  $htmlDoc-&gt;append('body', $divElement);
  
  $output = $htmlDoc-&gt;generate();
  </code></pre>
  
  <p>What is the best tool for this?</p>