In Zend Framework, most of the time to get a param, i will use
// from controller
$this->getRequest()->getParam('key');
but how can i get just GET params using the ‘Zend’ way? Or do i just use $_GET? Is there any difference between
$this->getRequest()->getParam('key');
vs
$_GET['key'];
Use
getQuery():Other methods available include
getParam()checks user params first, then $_GET, and then $_POST, returning the first match found or null.Try to avoid accessing the superglobals directly.