Welcome Guest, Not a member yet? Register   Sign In
Foreach as List
#2

[eluser]Dennis Rasmussen[/eluser]
Documentation: http://ellislab.com/codeigniter/user-gui...elper.html

Your code:
Code:
$options = array();

foreach($query->result() as $row)
{
    $options[$row->id] = $row->subject;
}

echo form_dropdown('field_name', $options);


Messages In This Thread
Foreach as List - by El Forum - 09-29-2010, 11:19 PM
Foreach as List - by El Forum - 09-30-2010, 01:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB