CodeIgniter Forums
Populate Dropdowns - 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: Populate Dropdowns (/showthread.php?tid=44715)



Populate Dropdowns - El Forum - 08-24-2011

[eluser]PixelPanic[/eluser]
I have searched but can't find anything on this.

I currently do my drop downs like so in the view
Code:
<label>DJ Select:</label>
&lt;?php
$sts_options = array('Open' => 'Open','Dan' => 'Dan','Bob' => 'Bob');
echo form_dropdown('djslot', $sts_options, $djslot, 'class="inputText"');
?&gt;
As I so far have not had the need for dynamic dropdowns, but do now but with a static option in there as well.

I need a dynamic drop down menu that takes data from the users table and shows it in the dropdown, however I also need a static option to be show, I need Open to be shown as well.

So it will be
Open
[Data from users table, eg Name]