how to get the value of multiple array ?? - 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: how to get the value of multiple array ?? (/showthread.php?tid=49526) |
how to get the value of multiple array ?? - El Forum - 02-23-2012 [eluser]ludo31[/eluser] Hello ; I have really a big problem to understand the multiple array in php . here is my function in model and it returns $data Code: public function getHomme() in controller I need this $data Code: public function gestionHomme() so with print_r($data); it shows that : Code: Array ( [rows] => Array ( [0] => stdClass Object ( [id] => 26 [nom] => rangers [prix] => 125600.00 ) [1] => stdClass Object ( [id] => 36 [nom] => catwoman [prix] => 125000.00 ) [2] => stdClass Object ( [id] => 42 [nom] => mimi ziznzin [prix] => 1542000.00 ) [3] => stdClass Object ( [id] => 46 [nom] => chausson [prix] => 125000.00 ) [4] => stdClass Object ( [id] => 47 [nom] => gege [prix] => 1250.00 ) [5] => stdClass Object ( [id] => 58 [nom] => brandeo [prix] => 126500.00 ) [6] => stdClass Object ( [id] => 62 [nom] => zonezero [prix] => 1542000.00 ) ) ) my problem is ho to get the value of id in function gestionHomme() because for example when we pass that to view : I need id as a parameter for model function : Code: $data['images']= $this->site_model->getImages($identifiant_chaussure); Code: $this->load->view('homme_view',$data); and in view (remark in view we test $rows not $data :bug: Code: <?php if([b]$rows[/b]!=null): and when we return in controller when we try to get the value of id : Code: public function gestionHomme() thanks how to get the value of multiple array ?? - El Forum - 02-23-2012 [eluser]InsiteFX[/eluser] Code: public function getHomme() |