Welcome Guest, Not a member yet? Register   Sign In
Passing data to a view within a view: Why doesn't this work?
#2

[eluser]dallen33[/eluser]
Controller
Code:
$data['title']    = 'Home';
$data['footer'] = $this->load->view('footer', '', TRUE);
$data['data']    = $data;
$this->load->view('home', $data);

View
Code:
<?php echo $this->load->view('header', $data); ?>

This works!

<?php echo $footer; ?>

This works, but seems clumsy.


Messages In This Thread
Passing data to a view within a view: Why doesn't this work? - by El Forum - 07-20-2010, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB