title: PHP Include for HTML?
body: <p>I have a navigational bar, an image, and a heading that I'll be including in every page of my website, so I wanted to use php include to refer to this code in several pages. However, I think I may have the syntax wrong or something because it's not rendering anything when I load it. Here are some code snippets:</p>
  
  <pre><code>&lt;!-- sample page --&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; 
  &lt;html&gt;  
  &lt;head&gt;  
  &lt;?php include ('headings.php'); ?&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php include ('navbar.php'); ?&gt;
  &lt;?php include ('image.php'); ?&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>navbar.php</p>
  
  <pre><code>    &lt;?php 
  
      echo '&lt;ul id="nav"&gt;
          &lt;li&gt;
              &lt;a href="Home.html"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a&gt;About Me&lt;/a&gt;
              &lt;ul&gt;
                  &lt;li&gt;
                      &lt;a href="Career.html"&gt;Career&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;a href="Coding.html"&gt;Coding&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;a href="Personal.html"&gt;Personal&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a href="Travels.html"&gt;Travel&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a href="Contact.html"&gt;Contact&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;';
  
      ?&gt;
  </code></pre>
  
  <p>Thanks for helping!</p>