I'm quite new to CodeIgniter and I'm trying to re-use the $data I pass to a view in another function from the same controller.
I have the following code :
class MyClass extends CI_Controller
{
function func1()
{
$this->mdata['first'] = "first";
$this->mdata['second'] = "second";
$this->load->view('my_view', $this->mdata);
}
function func2()
{
var_dump($this->mdata);
}
}
The fact is that apparently, I can't use my variable in the func2()...
Does someone has a trick to do so ?
Thanks.
B