0
私はビューという変数をStudentと定義します。私の見解では、StudentオブジェクトをJSONとしてどのように表示するのですか?私preview.phtmlビューでZend Framework 1.11でJSON形式のApplication_Modelを返す方法
public function previewAction()
{
// ...
$this->view->student = $student;
}
、私は次のようしている:PHPタグの周り
<script>
// this doesn't return the Application_Model as a JSON object in the html
var studentData = <?php echo Zend_Json::encode($this->student); ?>;
</script>
このリターンを何? – skafandri