Arrays and views |
[eluser]Colin Williams[/eluser]
Read over http://php.net/explode to understand what happens when you pass an array to a view (although it's pretty damn clear in the User Guide, IMO) Examples: Code: <?php $this->load->view('includes/header', array('main_content' => $main_content)); ?> Or, you can use $this->load->vars($data) from the controller, then all views will have $data's variables |
Messages In This Thread |
Arrays and views - by El Forum - 01-18-2010, 04:01 PM
Arrays and views - by El Forum - 01-18-2010, 04:45 PM
Arrays and views - by El Forum - 01-18-2010, 04:56 PM
Arrays and views - by El Forum - 01-18-2010, 05:00 PM
Arrays and views - by El Forum - 01-18-2010, 05:00 PM
Arrays and views - by El Forum - 01-18-2010, 05:55 PM
Arrays and views - by El Forum - 01-18-2010, 06:04 PM
Arrays and views - by El Forum - 01-18-2010, 06:11 PM
|