title: php newbie class
body: <pre><code>class Theme
  {
      function __construct()
      {
  
      }
  
      function load( $folder, $file )
      {
          $theme_path = ROOTPATH . '/theme/' . $folder . '/' . $file . '.php';
          require_once($theme_path);
          return TRUE;
      }
  }
  </code></pre>
  
  <p>on index.php</p>
  
  <pre><code>&lt;?php
  
  require class.theme.php
  $theme = new Theme;
  $theme-&gt;load('site','index');
  ?&gt;
  </code></pre>
  
  <p>on my site/index.php</p>
  
  <pre><code>&lt;?php 
  // to work i need another $theme = new theme; why can i do this ? can i make 
  it make it work twice or more inside the function load ?   
  $theme-&gt;load('site','header');
  $theme-&gt;load('site','footer');
  ?&gt;
  </code></pre>
  
  <p>somehow it needs to $theme = new Theme; again on site/index.php</p>
  
  <p>is there another way to make it work? maybe my class design is not good or algorithm is failing. </p>
  
  <p>edit* more information
  ok so what im trying to do is to load header view footer view.</p>