title: How do you include multiple page content in one php include file?
body: <p>I am wondering how would I include various elements (header, footer, nav), in one php file to be included on various pages, rather than creating multiple php files to be called separately?</p>
  
  <p>In my includes file I have the following code:</p>
  
  <pre><code>&lt;?php
  echo '&lt;h1 class="sub-elements"&gt;The elements for the current submission period are:&lt;span style="font-weight:bold; color:#ff6000;"&gt; Carnival, Residue, Maudlin&lt;/span&gt;.&lt;/h1&gt;';
  ?&gt;
  </code></pre>
  
  <p>Outputting onto an html page that is running php I have:</p>
  
  <pre><code>&lt;?php include('php-includes/current-elements.php');?&gt;
  </code></pre>
  
  <p>Is there a way to include a particular div or class, something other than the entire file itself? </p>
  
  <p>I just didnt want to create a separate php include file for every little element that i want to include on the same page.</p>
  
  <p>The code below is what I had within the same include file to call a different element to be displayed on another page.</p>
  
  <pre><code>&lt;?php
  function elements ()
  {
  echo'&lt;h1 class="sub-elements"&gt;The elements for the current submission period are:&lt;span style="font-weight:bold; color:#ff6000;"&gt; TESTING&lt;/span&gt;.&lt;/h1&gt;';
  elements();
  }
  ?&gt;
  </code></pre>
  
  <p>Any help would be great!</p>