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

(01-13-2015, 01:24 PM)Rufnex Wrote: 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); 

thanx i tried your solution and it worked
Reply


Messages In This Thread
RE: How to populate a dropdown from result_array - by andyblem - 01-15-2015, 12:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB