![]() |
foreach and array error can someone help me please - 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: foreach and array error can someone help me please (/showthread.php?tid=48809) |
foreach and array error can someone help me please - El Forum - 01-29-2012 [eluser]Miguel Diaz[/eluser] Hi I am trying to save some information in my database depending of an information I have on a table but it doesnt work, I am not to good with php and this is for my job I apprecciate all the help you can give me thanks. Controller Code: $names = $this->db->query("select encuestaPreguntaID from encuestaPregunta where encuestaID='1'"); Thanks in advance foreach and array error can someone help me please - El Forum - 01-29-2012 [eluser]vbsaltydog[/eluser] [quote author="Miguel Diaz" date="1327878362"] Code: $info = array( The quoted code is wrong. foreach and array error can someone help me please - El Forum - 01-29-2012 [eluser]pickupman[/eluser] Here's a little help. Code: $names = $this->db->select("encuestaPreguntaID")->where("encuestaID",'1')->get("encuestaPregunta")->result(); //Use ActiveRecord |