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

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

In the view header.php, I have <?php echo $title; ?>

Any idea why this doesn't work? The error is that title is an undefined variable.


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



Theme © iAndrew 2016 - Forum software by © MyBB