RE: [PHP] Using $$

From: Date: Thu, 19 Nov 2009 17:05:41 +0000
Subject: RE: [PHP] Using $$
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-299939@lists.php.net to get a copy of this message
> -----Original Message----- > From: Arno Kuhl [mailto:akuhl@telkomsa.net] > Sent: 19 November 2009 12:23 > > I was looking at some old code that I'm convinced once worked but > now using > php5 it doesn't seem to work anymore. > > $input = "_REQUEST"; > if (is_array($$input)) { > // do something > } > I tested something other than a superglobal and it works as > expected. What > am I missing? Depends where you have this fragment of code, but possibly the big fat warning box towards the bottom of http://php.net/language.variables.variable? Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507, Civic Quarter Campus, Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 812 4730 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

« previous php.general (#299939) next »