Loading two models in one view, causes problems? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Loading two models in one view, causes problems? (/showthread.php?tid=7231) |
Loading two models in one view, causes problems? - El Forum - 03-31-2008 [eluser]geshan[/eluser] Hello all code igniter users, I had to load two models in the same view how can I do it? it shows no erros when I load the second model in the view but when I call a function of the second model it gives me error says the 2nd model name is not identified. How can I load two models in one view? Loading two models in one view, causes problems? - El Forum - 03-31-2008 [eluser]xwero[/eluser] It should be no problem if you load the models in your controller. Loading two models in one view, causes problems? - El Forum - 03-31-2008 [eluser]Tom Glover[/eluser] Load your models in the controller and then out put the function a var that is handled by the view. An example: Controller: Code: function index() Just echo the the out1 or out2 where needed in the view file. Hope this helps. |