RE: [PHP] Variables don't pass... *sniff*
| From: | Ford, Mike [LSS] | Date: | Thu, 29 May 2003 14:22:05 +0000 |
| Subject: | RE: [PHP] Variables don't pass... *sniff* | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149404@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Wendell Brown [mailto:wbrown@arkie.net]
> Sent: 29 May 2003 15:18
>
> On Thu, 29 May 2003 10:33:16 +0100, Ford, Mike [LSS]
> wrote:
>
> >Well, how about references, then? (And me, personally, I'd
> use isset()
> >rather than is_array().)
> >
> > if (isset($_POST)):
> > $POST = &$_POST;
> > else:
> > $POST = &$HTTP_POST_VARS;
> > endif;
>
> I was told that PHP didn't do pointers - just goes to show that you
> can't believe everything your told. Thanks for the POINTER. ;)
Umm -- it doesn't -- these are *references* which are *not* pointers (but work just as well in
this instance). For the official word on this, see http://www.php.net/language.references .
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211