Nope, that code makes no sense. $_POST is an array containing the POST variables. You make a copy of that array an put it in $foo thereby overwriting the passed in $foo. Then you return $$foo which actually ends up returning a variable named $Array. It does not look like you have a $Array variable in scope, and it is surely not what the misguided coder behind this code was trying to achieve. In short, this is completely bogus.
-Rasmus On Sun, 31 Mar 2002, Gary wrote: > Can someone explain to me the reason for using return. > > function _getValue($foo) > { > $foo = $_POST; > return ${$foo}; > } > > TIA > Gary > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php