Not sure if its me or the configuration of PHP
I am trying to get the value of a variable, a variable variable
ie
// From Form $name = "My Name"; -----------------------------------
// from a list of values in a file $var="name";
$value=$$var;
i// I thought I could do something as simple as this to get the correct value "My Name" into $value.
print " $value "; // should print "My Name", I zip.
I have played around with this bit of code from operators part of the manual and this does not appear to work, well for me at least.
$foo = "test"; $$bar = "this is";
echo "${$bar} $foo"; // prints "this is test" Note: it is the same as echo "$test $foo"; // ***** for me it only prints out "test"
Any Ideas
Cheers
Neil
Regards
Chester Cairns -------------------------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php