get teh data as simple array

It is not that hard to use foreach, but just curious , is there a way to get the data from active record via findAll for example - as simple associative array ?

I’m not sure that it can be done via findAll(), but what I do if I want to get the result via array is use DAO, like

$array = Yii::app()->db->createCommand('SELECT * FROM tbl')->queryAll();

since what I only need is the data, and not the table rows and other objects that comes with findAll().

I need it from the active record :rolleyes:

$sites = OneXN::model()->getSites($n)->findAll();