I'd like to print a variable's name in a procedure along with it's value....

Is there a way to do this?


for example:
---------------------------------------------------------------------------
function showvar($somevar) {
echo "Now showing: ". <....... code to show var name .....> ."\n";
echo "Value: ".$somevar;


}

$s1 = "Hello World";
showvar($s1);
---------------------------------------------------------------------------

would produce:
---------------------------------------------------------------------------
Now showing: $s1
Value: Hello World
---------------------------------------------------------------------------


many thanks in advance... Ahbaid

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to