divテーブルに出力する$ dataにすべての情報を格納する "resultAction"という関数があります。PHPフォームデータをExcelまたはPDFにエクスポート
今、同じフォームデータをエクスポートしてExcelにエクスポートします。 "reportAction"という別の関数に同じフォームデータを渡したいのですが、失敗した$ dataを取り戻しています。
function resultAction()
{
for ($i = 0; $i < count($result); $i++) {
$data[$i]['device_type'] = $result[$i]['device_type'];
$data[$i]['region_name'] = $result[$i]['region_name'];
}
echo Zend_Json::encode($data);
sleep(2);
$this->_helper->viewRenderer->setNoRender();
$this->_helper ->layout()->disableLayout();
return $data;
}
function reportAction() {
$res = $this ->resultAction // here it fails
}
を探しています。これらの関数は、あるクラスのメンバですか? – Mchl
ちょっとコードを入れました。構文エラーを無視してください。 –
私はZend_Frameword @Mchlが – yokoloko