multiple data sets passed from one controller to one 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: multiple data sets passed from one controller to one view (/showthread.php?tid=31890) |
multiple data sets passed from one controller to one view - El Forum - 07-05-2010 [eluser]Unknown[/eluser] Hello I'm making my first application with codeigniter, so I have a form that has several select inputs, some populated with data from their own table. I've been reading several tutorials and guides but can't grasp yet how to pass multiple data sets (each array with data from a different table) to populate my select inputs. so I'm stuck in: $this->load->view('form', $data_from_table_city) but how can I pass the rest of the querys Hope can have some help, thanks in advance multiple data sets passed from one controller to one view - El Forum - 07-05-2010 [eluser]ulugbek[/eluser] Hi! Code: // controller I hope will help. Good luck! multiple data sets passed from one controller to one view - El Forum - 07-05-2010 [eluser]Unknown[/eluser] thanks nice answer. I just found some minutes ago array_merge() function, but your solution is much more simple. multiple data sets passed from one controller to one view - El Forum - 07-06-2010 [eluser]flaky[/eluser] how about $this->load->vars() Code: $data['some_dropdowns_stuff'] = $this->some_model->get_dropdown(); |