title: Correct way of outputting a large block of HTML in PHP
body: <p>I am learning PHP (no programming experience) from a book. The examples in the book use a strange way of outputting a large block of HTML conditionally. It closes the PHP tag inside the conditional, and reopens it after outputting the HTML. I understand (after some head scratching) how it works, but it seems like a dodgy, not-intended-to-be-used-like-this, workaround.</p>
  
  <pre><code>&lt;?php
      if(something == somethingelse) {
          echo "some message";
      }
       else {
  ?&gt;
  &lt;big-block-of-html&gt;
  &lt;/big-block-of-html&gt;
  &lt;?php }
  ?&gt;
  </code></pre>
  
  <p>The book did introduce the heredoc syntax, but never used it. Is there a right way of doing this? It would seem more intuitive to output the HTML from within PHP.</p>