Re: Variables don't pass... *sniff*
| From: | Wendell Brown | Date: | Wed, 28 May 2003 14:01:35 +0000 |
| Subject: | Re: Variables don't pass... *sniff* | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149244@lists.php.net to get a copy of this message | ||
On Wed, 28 May 2003 12:46:50 +0100, David Grant wrote:
>I would've thought that $HTTP_*_VARS will be deprecated sometime in the
>future. It might be an idea to write your own accessor methods, e.g.
>
>function RetrieveGetParameter($parameterValue)
Egads! Wouldn't the following be a little simpler?
At the top of the file put.....
if( is_array($_POST) )
$pArray = $_POST;
else
$pArray = $HTTP_POST_VARS;
Then access $pArray["fred"] where ever you want to? And yes, I know
this creates a second copy of the post array in local memory (wouldn't
pointers be nice right about now), but if the post array is going to be
accessed a lot, it would seem to be faster to copy it once than to call
the function over and over. :)