I want to make a Web Service for my site, I need to echo a JSON array
I am using this code:
$dataProvider=new CActiveDataProvider('AmakenPlaces',array(
'criteria'=>array(
'condition'=>'admin_active=1',
)));
$dataProvider->pagination->pageSize =10;
$dataProvider->pagination->pageVar = 'page';
But how can U make the following:
echo CJSON::encode($dataProvider);
Echo a JSON array from my database ... I am using $dataProvider for pagination feature.