Welcome Guest, Not a member yet? Register   Sign In
How to populate a dropdown from result_array
#5

You have to build a proper array for the dropdown function:

PHP Code:
$options = array();
foreach(
$departs as $option)
{
    
$options[$option['id']] = $option['names'];
}
echo 
form_dropdown('shirts'$options); 

Reply


Messages In This Thread
RE: How to populate a dropdown from result_array - by Rufnex - 01-13-2015, 01:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB