title: How to use a variable of a function in another function of same class -Codeigniter
body: <p>I want to assign the value of <code>$Id</code> from <code>firstFunction</code> to the variable <code>$temp</code> in <code>secondFunction</code>.</p>
  
  <pre><code>public function firstFunction()
  {
      $Id = $_POST['quizID_click'];
  }
  
  
  public function secondFunction()
  {
      $temp = ------;
  }
  </code></pre>
  
  <p>Please let me know how to access <code>$Id</code> in <code>secondFunction</code></p>