php class variable from a function used on another function
<p>I have declared a variable protected in my class, then I assign a value to the variable in my first function. And then I want to use that same variable, with its value in another function. But is not working, can anyone tell me what I'm doing wrong or if it is possible at all to do this or how it could be done. Here is some example of my code:</p>

<pre><code>class Forecast {
   protected $myStream;

   public function ajaxForecast() {
      $myStream = $GET_["selectedStream"];
      return json_enconde($myStream);
   }

   public function show() {
      echo $myStream;
   }

}
</code></pre>
