How can I convert the result of Trips::model()->findAll() to an array?
Easy and simple way: I use listData() method to make array to dropdown menus, and I think this will help you.. check this example:
code:
findAll();
// format models resulting using listData
$tripsArray = CHtml::listData($models, 'id', 'name');
print_r($tripsArray);
?>
output:
array(
'1'=>'trip1',
'2'=>'trip2',
'3'=>'trip3',
)