tags:

views:

306

answers:

1

How to get response as json format(application/json) in yii?

+1  A: 
$this->layout=false;
header('Content-type: application/json');
echo json_encode($arr);
Yii::app()->end(); 
tq0fqeu