This is related to my other question 'including files from inside an eval'.
Anyhow, how do you print the name of a variable as opposed to the value of the variable?
Specifically, I want to write a function that prints out the $GLOBALS array and values.
Here's what I have so far (which doesn't work for crap):
function PrintArray($array)
{
global $endl;
foreach($array as $arr)
{
if(is_array($arr))
{
print "<blockquote>".$endl;
SimplePrintArray($arr);
print "</blockquote>".$endl;
}
else
{
// want to print variable_name=$$arr
print $arr.$endl;
}
}
}
Another problem with this function is that when used on $GLOBALS it recurses forever, is there a way to stop that?
Thanks,
Marqis