I have this array data on my form.i used a controller to display value list.if i want to store it to database,using value of 1,and when i want to edit the data,it shows the text on dropdown.for example :
$data['material'] = array(
'1'=> 'Plastic',
'2'=> 'Rubber',
'3'=> 'Metal',
);
<select>
<?php foreach($material as $value)
{
echo '<option value=".$value['....']."'>'.$value['....'].'</option>
}
</select>
any tips for doing this ? Thank you