Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in
C:\inetpub\wwwroot\PHP\cat_proto3.php on line 46
Line 46 corresponds to the form tag, as follows:
FORM ACTION=?php echo $_SERVER['PHP_SELF'] ? method=POST
When you echo out
On Monday, June 24, 2002, at 12:15 PM, Johnson, Kirk wrote:
When you echo out an array element, the name needs to be enclosed in
curlies, e.g.,
echo {$_SERVER['PHP_SELF']}
I think that this is only important when using an associative array
element reference within certain kinds of
// this won't work b/c of quoting issues
echo This script is called $_SERVER[PHP_SELF];
// this should work fine IIRC
echo This script is called $_SERVER['PHP_SELF'];
Nope, use:
echo This script is called $_SERVER[PHP_SELF];
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: 24 June 2002 18:12
On Monday, June 24, 2002, at 12:15 PM, Johnson, Kirk wrote:
When you echo out an array element, the name needs to be enclosed in
curlies, e.g.,
echo {$_SERVER['PHP_SELF']}
I think
I thought this syntax, an unquoted key name, was deprecated ;)
From the manual at http://www.php.net/manual/en/language.types.array.php:
You should always use quotes around an associative array index.
Kirk
Nope, use:
echo This script is called $_SERVER[PHP_SELF];
--
PHP General Mailing
Not inside a quoted string.
On Mon, 24 Jun 2002, Johnson, Kirk wrote:
I thought this syntax, an unquoted key name, was deprecated ;)
From the manual at http://www.php.net/manual/en/language.types.array.php:
You should always use quotes around an associative array index.
Kirk
Nope,
On Monday, June 24, 2002, at 01:30 PM, Ford, Mike [LSS] wrote:
You can use:
echo This script is called {$_SERVER['PHP_SELF']};
echo This script is called ${_SERVER['PHP_SELF']};
echo This script is called $_SERVER[PHP_SELF];
or even
echo This script is called .
7 matches
Mail list logo