I'm not sure how to make a few parts of my form to populate from data from an array I'm passing from the database.
First is this <select> object. The key estimate_lead_id in the database holds the value, and I want the dropdown to auto-select based on the value from the database.
<select name="estimate_lead_id">
<? foreach($leads->result() as $lead) { ?>
<option value="<?=$lead->id?>"><?=$lead->lead_name?></option>
<? } ?>
</select>
EDIT: I'll break the second part into another question.