Welcome Guest, Not a member yet? Register   Sign In
View data being carried through to the next view?
#1

[eluser]FlashChilli[/eluser]
Hi, I have the code:

Code:
$data['heading'] = 'Pages » New';
$data['class'] = "first";
$this->load->view("core/panel_top.php", $data);
$this->load->view("core/panel_bottom.php");

unset($data);
$this->load->view("core/panel_top.php");
$this->load->view("core/panel_bottom.php");

The first instance of panel_top.php has the variables set, like it should. But for some reason, the second instance of panel_top.php also has these variables set even though I didn't pass it the data array (I even unset the array just in case).

Does codeigniter carry variables through instances of the same views? Is there a way to "clear" these variables as I don't want them to be set in the second view.

Thanks.


Messages In This Thread
View data being carried through to the next view? - by El Forum - 07-11-2009, 10:10 AM
View data being carried through to the next view? - by El Forum - 07-12-2009, 06:13 AM
View data being carried through to the next view? - by El Forum - 12-24-2010, 11:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB