title: CodeIgniter Common Header Include
body: <p>I am very new to CodeIgniter, but I think I have a grasp on how it works.</p>
  
  <p>Typically when I make a website, like a 5-page site, I have my header file in a php file which is included in each page, so that if I have to alter the header I only have to do it in one spot rather than changing it five times. </p>
  
  <p>In my CodeIgniter application, I have a function for each page in my controller which loads a different view, depending on the function. For example,</p>
  
  <pre><code>    public function Index() {
  
      $data = array();
      $this-&gt;load-&gt;view('index',$data);
  
  }
  
  public function blog() {
  
      $data = array();
      $this-&gt;load-&gt;view('inner1',$data);
  
  }
  </code></pre>
  
  <p>Then I can put all my logic in the controller.</p>
  
  <p>What's the best way to have one referenced header? Should I put it in the controller as a variable and then send it as data to each view?</p>
  
  <p>Also, if there's a more efficient way of doing this, please suggest it!</p>
  
  <p>Thanks!</p>