Iterating over a group of models with a foreach loop

Hi, I am really new to this and I am afraid that is going to show. This should be simple. I am trying to iterate over an array of models.

    $dataProviderQuestion=new CActiveDataProvider( 'Question',

// 'Question' is the model

// I am using a  CactiveDataProvider because I know how to filter date with it.




                //'order'=>'create_time DESC',




   foreach ($dataProviderQuestion->getdate() as $m) {

// $m should be the models?

        $items[] = "<label>" . CHtml::checkbox('List[]', 1, array('value' => $count)) . $m->prompt . "</label>";



On the line with ‘foreach’ I get the error “CActiveDataProvider and its behaviors do not have a method or closure named “getdate”.” But acording to it does. I think all I need is an array of the models so the foreach loop can go over them. Please help.


That is embarrassing. If I spell data right that might help.