title: Is it possible to add content to <head> from <body> in PHP
body: <p>I'd like to know if it is possible to add content to the <code>&lt;head&gt;</code> section of HTML from the <code>&lt;body&gt;</code>, in PHP.</p>
  
  <p>I know how to do this in JQuery, but I need to the final HTML code to already have the aditional data.</p>
  
  <p>I also know that I can use <code>ob_start()</code> to manage all the content that will be processed, but the reason I'm asking this is because I have some websites already finalized and wanted to know if there is a simpler way to do this, instead of restructure the entire website (and it isn't just one, there are several).</p>
  
  <p>Just for explain better, usually my websites are structured like this:
   - I have a "<code>master page</code>", who have all the content there are present in the whole site (like header, footer, etc), kind of like this (it's not this simple - I use validation, friendly URLs, etc - it's for example only):</p>
  
  <pre><code>&lt;?php
    $page = $_GET['page'];
    &lt;html&gt;
    &lt;head&gt;
      // All my header content
    &lt;/head&gt;
    &lt;body&gt;
      if($page == 'home')
        include('pages/home.php');
      elseif($page == 'about')
        include('pages/about.php');
    // etc
    // Here comes my footer content
   &lt;/body&gt;
  &lt;/html&gt;
  ?&gt;
  </code></pre>
  
  <p>Bottom of line: I want to add content to the <code>&lt;head&gt;</code> from some of the pages included.</p>
  
  <p>Since now, thank's for all help.
      </p>