Re: PHP_SELF Undefined
| From: | Erik Price | Date: | Mon, 18 Feb 2002 23:47:59 +0000 |
| Subject: | Re: PHP_SELF Undefined | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85311@lists.php.net to get a copy of this message | ||
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 pricee@hhbrown.com