![]() |
foreach outputting 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: foreach outputting array? (/showthread.php?tid=41737) |
foreach outputting array? - El Forum - 05-15-2011 [eluser]Th3FalleN[/eluser] Okay i have another noobish question what im attempting to do is a foreach statement from a query and have it outputted as an array or some way that i could use the results with the form_dropdown() function in CI any ideas? foreach outputting array? - El Forum - 05-16-2011 [eluser]d1a8lo24[/eluser] Example on your view file Code: <select name=""> I hope it helps foreach outputting array? - El Forum - 05-16-2011 [eluser]osci[/eluser] in your model Code: function get_combo() in your controiller Code: //...... in your view Code: <?php echo form_dropdown('name', $rs_combo); ?> |