Get multidimentional Array from ModelName::model()->findAll();

How to get multidimentional array from ModelName::model->findAll();

I am intending to get the result same as that we used to get in CakePHP by using findAll().

I dont need an array of objects, instead I would like to have a multidimentional array of records which could be used in listing or what ever.

eg.

Category::model()->findAll();

result:-

[Category] => array(

           [0] =>array('id'=>1, 'name'=>'fruits'),


           [1] =>array('id'=>2, 'name'=>'automobiles'),


           [2] =>array('id'=>3, 'name'=>'electronics'),


         );

try the extension activedataprovider, i think that it’s what you are looking for…