public function iatriberegionAction() { if ($this->_getParam('term', false)) { $tribes = new Tribes(); $response = $tribes->getIronAgeTribeRegion($this->_getParam('term')); } else { $response = array(array('id' => NULL, 'term' => 'No region specified')); } echo Zend_Json::encode($response); }