I'm wondering if someone can help me out. I have a form_dropdown which I'm filling with options from the database. I want to add a default "Please Select" value at the top of the list, but can't figure out how to do it without adding that to the database.
My code is as follows:
function populatedropdown()
{
$query = $this->db->query('SELECT * FROM '.$this->table_name.' WHERE active=1 ORDER BY brand');
$dropdowns = $query->result();
foreach($dropdowns as $dropdown) {
$dropDownList[$dropdown->brand] = $dropdown->brand;
}
$finalDropDown = $dropDownList;
return $finalDropDown;
}