コントローラーにある以下のコードからの応答をビューに戻す方法を理解するのに苦労しています:
if ($this->request->isAjax()){
Configure::write ( 'debug', 0 );
$this->autoRender = 0;
$this->layout = 'ajax';
$results = "My Data";
echo json_encode($results);
}
//tried doing this and it doesn't work
$this->set('results',$results);
ビューに戻って $results 変数にあるデータにアクセスできるようにしたいだけです。