title: Php oop echo-ing a single variable from within a class
body: <p>I'm very new to PhP oop.I'm trying to make a small project here is my code:</p>
  
  <pre><code>class Language {
  
      public $hello;
      public $greetings;
  
      public function english(){
          echo $this-&gt;hello = "Hello" . "&lt;br&gt;";
          echo $this-&gt;greetings = "Greetings" . "&lt;br&gt;";
      }
  
      public function british(){
          echo $this-&gt;hello = "Ello there mate!" . "&lt;br&gt;";
          echo $this-&gt;greetings = "Oi ya cheeky bugger" . "&lt;br&gt;";
      }
  }
  
  $language = new Language;
  
  echo $language-&gt;english();
  echo $language-&gt;british();
  </code></pre>
  
  <p>How can I echo the variable <strong>$hello</strong> but only from 1 of the funcions? I really don't get the how I'm suppose to do it here.</p>
  
  <p>Basically I want to grab <strong>$hello</strong> from <strong>english()</strong> and echo it out inside a</p>
  
  <pre><code>&lt;p&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Or something along those lines</p>
  
  <p>Can someone point me in the right direction?</p>