public function pagingimgaAction() { $this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout->disableLayout(); if (isset($_POST['page'])) { $check_recent = $_POST['check_recent']; $position = $_POST['page'] * 20; $data = My_Model_Api_Quote::get_img_pagin($position, 20, $check_recent); $total_row = My_Model_Api_Quote::get_count_img_pagin($check_recent); $dataArray = array('total' => $total_row, 'data' => $data); echo json_encode($dataArray); } }