title: How to load view and return value to another function in controller codeigniter
body: <p>I am new to codeigniter,I need to load a view and also return value to another controller.How to make it</p>
  
  <p>here is my controller </p>
  
  <pre><code>function test1 {
  
  
    $value=  $this-&gt;input-&gt;post('value1');
    //some code 
     return ($result)
    $this-&gt;load-&gt;view('test');
  
  }
  
  function test2 {
  
  
    $resultvalue= $this-&gt;test1;
  
     echo($result);
            //some code 
  
  
  }
  </code></pre>