Welcome Guest, Not a member yet? Register   Sign In
Loading multiple views concurrently - $data array can't be used unless it's loaded in the first!
#8

[eluser]stormbytes[/eluser]
[edit]

Phil -

Thanks for the post. I'll have to review what you wrote a couple of times Smile It's slightly above my pay-grade at this point. I take it you're explaining why CI has to follow the steps it does, which in part is why I'm having the issue I described. That's fine. I'll simply keep an eye out for it, making sure my array is included in the first load->view statement.

Actually I think I get it -

You're saying the way they've got it now, if I have the following statement:

Code:
$data['var'] = 'foo';
$this->load->view('header', $data);

And then subsequently, in the same function, a second statement:

Code:
$data['var'] = 'bar';
$this->load->view('page', $data);

Because of the sequentiality of interpreting the class, I'll actually have $var = 'foo' in 'header', and $var = 'bar' in page.

Makes sense..


Messages In This Thread
Loading multiple views concurrently - $data array can't be used unless it's loaded in the first! - by El Forum - 10-04-2010, 06:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB