title: how to access an element that included using php file
body: <p>I set template php scripts in order to easily make a change to the file. I have index.php as main page and two php scripts footer.php and header.php. I included two of them in index.php. My question is can access html elements inside footer.php from header.php?</p>
  
  <blockquote>
    <p>index.php</p>
  </blockquote>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt; 
   &lt;head&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;div class="header"&gt;&lt;?php require "templates/header.php" ?&gt;&lt;/div&gt;
      &lt;div class="footer"&gt;&lt;?php require "templates/footer.php" ?&gt;&lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <blockquote>
    <p>header.php</p>
  </blockquote>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt; 
   &lt;head&gt;
    &lt;script src="scripts/jquery.js"&gt;&lt;/script&gt;
    &lt;script&gt;
     $(document).ready(function(){
      $("#footerDiv").css('display','none');
      });
    &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <blockquote>
    <p>footer.php</p>
  </blockquote>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt; 
   &lt;head&gt;
    &lt;script src="scripts/jquery.js"&gt;&lt;/script&gt;
    &lt;script&gt;
     $(document).ready(function(){
      $("#footerDiv").css('display','block');
      });
    &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
    &lt;div id="footerDiv"&gt;
     &lt;p&gt;I wanted to access this div from header.php&lt;/p&gt;
    &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>