Accessing data in controller - 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: Accessing data in controller (/showthread.php?tid=5383) |
Accessing data in controller - El Forum - 01-20-2008 [eluser]Martin Rusev[/eluser] Hello everybody, I am pretty new to php an Codeigniter. Right now i am writing my first real world application. From some time i am facing the following problem I have this hierarchy: main category -> subcategory -> product Đ•very page has a breadcrumb - I load all the information and the breadcrumb information at the same time with the following : Code: // Loading Main category name from the database And finally i want to access subcategory_id from this array and pass it back to my model for retrieving Subcategory name from another table in the database Code: $this->load->model('subcategoriesmodel'); thanks Accessing data in controller - El Forum - 01-20-2008 [eluser]tonanbarbarian[/eluser] fail to see what the problem is? is there an error or something? Accessing data in controller - El Forum - 01-20-2008 [eluser]Martin Rusev[/eluser] Yes there is I want to retrieve all the information from the database and then use it and pass only subcategory_id from the retrieved array back to another model that retrieves Subcategory name from another table From this array - i am trying to take the value of subcategory_id - all this happens in the controller i searched through the forum and don't found any way to take this value Code: Array Accessing data in controller - El Forum - 01-20-2008 [eluser]tonanbarbarian[/eluser] This is just basic PHP Code: $products[0]->subcategory_id |