Echo the name of a variable?
Let's say I'm passing a variable to a function.
Example:
Is there any way to echo the name of the array passed in as the argument for
Edited to add:
an echo statement on $array_name returns the text
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.
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.
