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'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

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

Reply via email to