将cactivedataprovider转换为具有特定形式的数组

im using yii1 on my application. i want to convert from cActivedataProvider to array

this is the code

    $dataSS = new CActiveDataProvider('category', array(
        'criteria' => array(
            'condition' => 'menu=:menu',
            'params' => array(':menu' => $menu),
        ),
        'pagination' => false
    ));
   $dataMenu = array();
   foreach ($dataSS->getData() as $record) {
      $dataMenu[] = array(
              'label' => $record->name,
               'url' => '#',
       );
   }

this is the result :

 Array ( 
[0] => Array ( [label] => Food and Drink [url] => # ) 
[1] => Array ( [label] => Sleman [url] => # ) 
)

the result that i expected :

Array ( 
    Array ( 'label' => 'Food and Drink', 'url' => '#' ) ,
    Array ( 'label' => 'Sleman', 'url' => '#' ) ,
    )

any suggestion?

Finally get the answer, this is really my bad because i call the function on wrong way.


This is the wrong way :

'items' =>array(Category::model()->getMenu("2");),

and this is the correct way :

'items' =>Category::model()->getMenu("2"),