Using $$

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 know $_REQUEST is an array, but $$input is NULL (I was expecting it ==
$_REQUEST).
 
I also tried ${$input} but same result.
 
I tested something other than a superglobal and it works as expected. What
am I missing?
 
Cheers
Arno



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux