zend framework email validation $value=array(‘smarttips@smarttips.in,test@gmail.com’); // Validate emails $validate = new Zend_Validate_EmailAddress(); $emails = array_unique(array_filter(array_map(‘trim’, preg_split(“/[s,]+/”, $value)))); if( empty($emails) ) { return false; } foreach( $emails as $email ) { if( !$validate->isValid($email) ) { return false; } }
Tag: zend framewrok
php zend Pagination
Zend pagination Zend pagination is a default option available in zend framework. Only needs to use it .The codes are apply in controller and view class Admin_PollsocietiesController extends Core_Controller_Action { public function listsocreqAction() { $oSocReqs = new Model_Societysignup(); $aSocReqs = $oSocReqs->getPendingRequests(); unset($oSocReqs); //for pagination $climit = 20; $page1 = $this->_getParam(‘page’,1); $paginator = Zend_Paginator::factory($aSocReqs); $paginator->setItemCountPerPage($climit); $paginator->setCurrentPageNumber($page1);…