[eluser]pasquattro[/eluser]
Hi, im very new to this and would like to use DCZ's code. Could someone explain the code for the model so I can try and implement it.
Code:
function get_dropdown_array($key, $value, $from){
$result = array();
$array_keys_values = $this->db->query('select '.$key.', '.$value.' from '.$from.' order by id asc');
foreach ($array_keys_values->result() as $row)
{
$result[$row->$key]= $row->$value;
}
return $result;
}
thanks.