[SOLVED] controller not passing Data to my veiw - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: [SOLVED] controller not passing Data to my veiw (/showthread.php?tid=33046) |
[SOLVED] controller not passing Data to my veiw - El Forum - 08-13-2010 [eluser]Neocrypter[/eluser] Ok so the second installment of Neo needs help and feels like a tard is as follows. My controller is not passing data to my my veiw, or im not reading the error im getting correctly as its been many years since ive worked with php, somewhere around php 3 . Here is my controller Code: <?php here is the foreach loop in my veiw Code: <?php foreach($query as $row):?> and lastly here is there error Quote:A PHP Error was encountered thanks in advance. [SOLVED] controller not passing Data to my veiw - El Forum - 08-13-2010 [eluser]Italo Domingues[/eluser] Read the documentation for CI and search the forum, that kind of questions surely must have some topic Change your code Code: <?php foreach($query as $row):?> For Code: <?php foreach($query as $row):?> [SOLVED] controller not passing Data to my veiw - El Forum - 08-13-2010 [eluser]mi6crazyheart[/eluser] Hey!!! i feel u r doing some thing wrong in u'r view file in that foreach loop. It should be like this... ex: Code: foreach($query as $item): Hope u've got the idea... [SOLVED] controller not passing Data to my veiw - El Forum - 08-13-2010 [eluser]Neocrypter[/eluser] thanks mi6crazyheart, that worked great, i was following along the CI video tutorial and the way i had it was the way they were doing it, also i looked at the user manual and thats the way they had it as well, so I was at a complete loss, ive been looking on the forums and google for the better part of an hour or more before I posted here on this. |