title: PHP OOP call method variable from another method
body: <p>I'm newbie at PHP OOP please patient to teach me.</p>
  
  <p>With the code below, the page will call "index" method to be shown.
  And the "index" method wants to call from another method (getView).</p>
  
  <p>How to correct the code method of "index".</p>
  
  <pre><code>class Report {
  
      public function index(){
          $over = $this-&gt;overview;
          return $over;
      }
  
      public function getView()
      {
          $overview = 'I want this show up at index';
          return $overview;
      }
  }
  </code></pre>