title: Preferred way to combine PHP and HTML?
body: <p>I learned PHP by hacking away at <a href="http://phpbb.com" rel="noreferrer">phpBB2</a>, even submitting a few mods to their database, which others downloaded and used. (I don't believe phpBB2 is supported any more with phpBB3 out so long now, so the v2 mods database is no more.)</p>
  
  <p>One of my favorite things about phpBB was their templates system, which let the editor completely separate the HTML and the PHP. PHP files contained PHP: logic, database queries, and activating the templates. TPL files contained templates: HTML, template variables, and specialized HTML comments to allow for conditional or repeating blocks.</p>
  
  <p>However, any time I see someone's PHP code online, it's either a small snippet working with a single function or such, or the PHP is full of strings containing HTML (or worse, HTML with PHP interspersed). phpBB is the only PHP I've looked at which actually separates the language and the markup language, suggesting to me that few, if any, other PHP codebases do such a thing.</p>
  
  <p>I'm looking to start working with some PHP again, but this time it won't be a phpBB forum, and it will be on a team. <em>Based on my experience</em>, separation of PHP and HTML is uncommon (please correct me if I'm wrong on this!). However, I'm so used to that dividing line, I hate reading mixed PHP and HTML.</p>
  
  <p>In the "real world" of PHP programming, what's the preferred method:</p>
  
  <ul>
  <li>PHP files with strings of HTML</li>
  <li>HTML files broken up with PHP blocks</li>
  <li>PHP and HTML completely separate (I wish?)</li>
  <li>Something else?</li>
  </ul>