Using Yii, how can I get an array from an Active Record.
Say something like this:
array(\'foo\', \'bar\', \'lala\')
From something like thi
You could also do something like
$countries = Country::model()->findAll();
array_values(CHtml::listData($countries, 'country_id', 'country_name'));
which returns an array of all country names, or
array_keys(CHtml::listData($countries, 'country_id', 'country_name'));
which returns an array of all country ids.