[eluser]Chad Crowell[/eluser]
Code:
<?=$options = array(
'' => 'In All Categories',
foreach($categories as $category):
'$category->shortname' => '$category->category_name',;
endforeach;
);
echo form_dropdown('searchcat', $options);?>
My code is above- I am creating a dropdown with one static choice at the top, then I want to add all the records from the dataset $categories, using the shortname as the value and the category_name as the label. How do I code this so the two can interact?