Controller

$data['city_list'] = $this->City_model->get_dropdown_list();
$this->load->view('my_view_file', $data); 

Model

function get_dropdown_list()
{
$this->db->from('city');
$this->db->order_by('name');
$result = $this->db->get();
$return = array();
if($result->num_rows() > 0) {
foreach($result->result_array() as $row) {
$return[$row['id']] = $row['name'];
}
}

        return $return;

}

View

<?php echo form_dropdown('city_id', $city_list, set_value('city_id', $city_id));

Orignal source: http://ellislab.com/forums/viewthread/166284/