RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
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

Re: [PHP] function definition causing problems?

2002-06-24 Thread Erik Price
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

Re: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
// 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

RE: [PHP] function definition causing problems?

2002-06-24 Thread Ford, Mike [LSS]
-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

RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
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

RE: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
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,

Re: [PHP] function definition causing problems?

2002-06-24 Thread Erik Price
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 .