On Monday, February 18, 2002, at 06:14 PM, Lars Torben Wilson wrote:
> Sorry, but I do have to correct you here--this isn't true. ;) In double-
> quoted strings and heredocs, you can do the following:
>
> $foo = "This page is $_SERVER[PHP_SELF]";
>
> Or, better:
>
> $foo = "This page is {$_SERVER['PHP_SELF']}";
>
> You do have to concat to do this in single-quoted (noninterpolated)
> strings, though.
Ah, I had forgotten about that. I stay away from the first version, and
completely forgot about the second version. Ironic, because IIRC it is
the answer to one of the first questions I posted on this list. (I was
trying to include mysql_fetch_array elements in print statements and
didn't want to transfer the value to a scalar beforehand, or
something! :)
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php