[eluser]LeePR[/eluser]
I have a view like this:
Code:
// Main view
$data['foo'] = "bar";
$this->load->view('thing1', $data);
$this->load->view('thing2');
$this->load->view('thing3');
In thing1, I can do
Code:
// Thing 1
echo $foo // gives "bar"
however, even though I'm no passing the data array into thing2, thing2 will still see the data e.g.
Code:
// Thing 2
echo $foo // gives "bar"
Even if I change thing1 to the following
Code:
// Thing 1
echo $foo // gives "bar"
$foo = null;
and change the main view to
Code:
// Main view
$data['foo'] = "bar";
$this->load->view('thing1', $data);
$data = null;
$this->load->view('thing2', null);
$this->load->view('thing3');
]
thing2 is still printing out bar!
Code:
// Thing 2
echo $foo // gives "bar"
Caching is off AFAIK (I haven't explicitly turned it on anywhere). Can anyone tell me how I might reset the data array?