![]() |
Can only pass part of $data to view? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Can only pass part of $data to view? (/showthread.php?tid=47214) |
Can only pass part of $data to view? - El Forum - 11-29-2011 [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? I GET: A PHP Error was encountered Severity: Notice Message: Undefined variable: page_title Filename: includes/page.php |