CodeIgniter Forums

Full Version: Can only pass part of data to view?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Sven Delle[/eluser]
Please, explain to me why, when passing this data to a view:

$data['page_title'] = 'Singnup Successful!';
$data['main_content'] = 'singnup_successful';
$this->load->view('includes/page', $data);

I can ONLY trace $main_content but NOT $page_title, when doing this:

echo $main_content; // This works
echo $page_title; // This do NOT work?

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: page_title

Filename: includes/page.php