I have a probelm with view - 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: I have a probelm with view (/showthread.php?tid=43815) |
I have a probelm with view - El Forum - 07-24-2011 [eluser]ivelin[/eluser] In my controller Code: function get_images(){ and my view Code: <div id="images"> Quote:A PHP Error was encounteredWhere is my mistake?? I have a probelm with view - El Forum - 07-24-2011 [eluser]cpass78[/eluser] Does the following work? Code: function get_images() { I have a probelm with view - El Forum - 07-24-2011 [eluser]bubbafoley[/eluser] you need to wrap $image in an array Code: $this->load->view('upload_success', array('image' => $image)); I have a probelm with view - El Forum - 07-25-2011 [eluser]John_Betong_002[/eluser] Hi ivelin With your original source your loop overwrites $image[$key] ['info'] and you will only have the last item in your array. Try this: // controller Code: $path = 'path-to-your-picture-files'; // view Code: echo "<dl style='margin:2em'>"; edit: forgot the closing code tag I have a probelm with view - El Forum - 07-27-2011 [eluser]ivelin[/eluser] thanks!! I have a probelm with view - El Forum - 07-27-2011 [eluser]John_Betong_002[/eluser] [quote author="ivelin" date="1311810095"] thanks!! [/quote] I am glad I was able to help. Please prefix the thread title with [SOLVED] I have a probelm with view - El Forum - 07-27-2011 [eluser]toopay[/eluser] Next time, it would be nice if someone post this kind thread on other section. I have a probelm with view - El Forum - 08-01-2011 [eluser]Unknown[/eluser] Can't someone else mark it SOLVED ? |