Thanks Ryan,
but what I want is to be able to pass any variable to a procedure and have the variable name and value printed by the procedure.
Can this be done?
I'm trying to extend my library of debugging functions/procedures by having a procedure which can be used to "inspect" a variable whenever I call it.
Thanks
Ahbaid
Ryan A wrote:
Just escape it...
eg:
$ryan = "something";
echo "\$ryan =".$ryan;
that would print:
$ryan = something
HTH.
Cheers, -Ryan
On 5/5/2004 5:02:25 PM, [EMAIL PROTECTED] wrote:
I'd like to print a variable's name in a procedure along with it'svalue....
-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