title: Pass variables of a function to other function in a controller in codeigniter?
body: <p>I have a controller that has the next functions:</p>
  
  <pre><code>class controller {
  
      function __construct(){
  
      }
  
      function myfunction(){
          //here is my variable
          $variable="hello"
      }
  
  
      function myotherfunction(){
          //in this function I need to get the value $variable
          $variable2=$variable 
      }
  
  }
  </code></pre>
  
  <p>I thanks for your answers.  How can I pass variables of a function to other function in a controller of codeigniter?</p>