title: PHP function/class that formats/indents my HTML code?
body: <p>Is there a PHP function/class that cleans my HTML code?</p>
  
  <p>For example:</p>
  
  <pre><code>$html = "&lt;ul&gt;&lt;li&gt;item1&lt;/li&gt;&lt;li&gt;item2&lt;/li&gt;";
  echo htmlClean($html);
  
  /*
      Outputs:
      &lt;ul&gt;
          &lt;li&gt;item1&lt;/li&gt;
          &lt;li&gt;item2&lt;/li&gt;
      &lt;/ul&gt;
  */
  </code></pre>