title: Include header in index?
body: <p>I have a small problem i have the following code and want to add a language switch to my site.
  Let's assume I have a header.php and an index.php. 
  I want to include the buttons and the script in the header.php. The Header.php is included in the index.php. How can I access the functions in the header from index.php ?</p>
  
  <p>My Code : </p>
  
  <p>In the Header.php</p>
  
  <pre><code>  &lt;head&gt;
      &lt;style type="text/css"&gt;
        body.fr &gt; p[lang=en] {
          display: none;
        }
        body.en &gt; p[lang=fr] {
          display: none;
        }
      &lt;/style&gt;
    &lt;/head&gt;
      &lt;button onclick="document.body.className='en'"&gt;English&lt;/button&gt;
      &lt;button onclick="document.body.className='fr'"&gt;French&lt;/button&gt;
  </code></pre>
  
  <p>In the Index.php</p>
  
  <pre><code>                &lt;?php
                  include('header.php');
                  ?&gt;  
  
    &lt;body class="en"&gt;
      &lt;p lang="en"&gt;This is English&lt;/p&gt;
      &lt;p lang="fr"&gt;This is French&lt;/p&gt;
    &lt;/body&gt;
  </code></pre>
  
  <p>If i click on the buttons, the text don't change. I assume that i must integrate the header.php with the index.php content but how ?</p>