Echo the name of a variable?
Date: 02/03/06
(PHP Community) Keywords: no keywords
Let's say I'm passing a variable to a function.
Example:
function upload_data($array_name, $other_stuff)
{
magic code of wonder
}
Is there any way to echo the name of the array passed in as the argument for $array_name
?
Edited to add:
an echo statement on $array_name returns the text Array
. What I want is the name of the array that is passed into this function. For example, if I were to type:
upload_data($foo, $bar)
I would like to be able to echo "foo". Not the array contents, or the value of the variable, but the name of the variable itself.
Source: http://community.livejournal.com/php/407079.html