public function getReportingRateAction() { $year = $this->_request->getParam('year', ''); $month = $this->_request->getParam('month', ''); $province = $this->_request->getParam('province', ''); $district = $this->_request->getParam('district', ''); $level = $this->_request->getParam('level', ''); $geoModel = new Model_Geo(); if ($level == 4) { $return = $geoModel->getReportingDistrict($year, $month, $province); } else { $return = $geoModel->getReportingTehsil($year, $month, $province, $district); } echo Zend_Json::encode($return); }