title: Null string returned from function but can print/echo inside function
body: <p>I have a function inside a basic CMS that I'm writing:</p>
  
  <pre><code>protected function loadContent(){
      //Use the pages table
      $this-&gt;_dBase-&gt;table = 'pages';
      //Select Content
      $query = $this-&gt;_dBase-&gt;select('page_id, title, content', array('name' =&gt; get_class($this)));
      $html = $query[0]['content'];
      var_dump($html);
      return $html;
  }
  </code></pre>
  
  <p>It gets called by my view method:</p>
  
  <pre><code>public function view(){
      $this-&gt;loadHeader();
      $this-&gt;loadNav();
  
      //Load possible methods
      //If false, loads main content
      if(!$this-&gt;loadMethod()){
          echo $this-&gt;loadContent();
      }
      $this-&gt;loadFooter();
  }
  </code></pre>
  
  <p>The var_dump shows:</p>
  
  <pre><code>string '&lt;div class="jumbotron"&gt;
  
           &lt;h1&gt;LiteCMS &lt;small&gt; a basic OOP PHP CMS&lt;/small&gt;&lt;/h1&gt;
  
           &lt;p&gt;Manage the content of your Website with ease, using Twitter Bootstrap!&lt;/p&gt;
  
           &lt;p&gt;
  
             &lt;a class="btn btn-lg btn-primary" href="/about"&gt;Learn More &amp;raquo;&lt;/a&gt;
  
           &lt;/p&gt;
  
         &lt;/div&gt;' (length=301)
  </code></pre>
  
  <p>However, when I call the string to view(), it's Null.  I've tested this by trying to return a string of 'test', and it still returns Null.  I feel a little stupid, I haven't been able to reproduce this on a test page for printing a returned string value.  What am I missing here?</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Update:
  The error was occurring in an Inherited Class.  I was out of scope in the child class loadContent when I called the parent method loadContent. Derp.</p>