Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/03/2011, 11:14
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: $_POST Vs. getPost()

Añado, esto es lo que hace getPost
Código PHP:
Ver original
  1. // /Zend/Controller/Request/Http.php
  2.     /**
  3.      * Retrieve a member of the $_POST superglobal
  4.      *
  5.      * If no $key is passed, returns the entire $_POST array.
  6.      *
  7.      * @todo How to retrieve from nested arrays
  8.      * @param string $key
  9.      * @param mixed $default Default value to use if key not found
  10.      * @return mixed Returns null if key does not exist
  11.      */
  12.     public function getPost($key = null, $default = null)
  13.     {
  14.         if (null === $key) {
  15.             return $_POST;
  16.         }
  17.  
  18.         return (isset($_POST[$key])) ? $_POST[$key] : $default;
  19.     }

Estuve cerca
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos