title: Is there anyway to produce readable HTML source from PHP?
body: <p>I'm not very experienced at php, so if there's an easy function for this, I'll feel like an idiot.</p>
  
  <p>When coding in PHP, at the point where you need to echo some HTML code, I have found I have either one of two options.</p>
  
  <p>A: <code>echo "&lt;!--html text here--&gt;";</code></p>
  
  <p>B: <code>echo "\t\t\t&lt;!--html text here--&gt;\n"</code>;</p>
  
  <p>If I were to use method A throughout the code, looking at the php code from client side using view-source produces a solid block of code which is difficult to read.</p>
  
  <p>If I were to use method B, it looks fine client-side, but the actual source code looks messy.</p>
  
  <p>Is there anyway to keep both server and client-side appearance clean?</p>