Re: PHP_SELF syntax

From: Date: Mon, 24 Feb 2003 00:01:34 +0000
Subject: Re: PHP_SELF syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136794@lists.php.net to get a copy of this message
At 00:55 24.02.2003, Peter Gumbrell said: --------------------[snip]-------------------- >Could someone tell me why this code prompts a parse error. I have tried it >several different way. The statement is called from within a function: > >print "<form method=\"POST\" name=\"update_workshop\" >action=\"$_SERVER['PHP_SELF']\">\n"; --------------------[snip]-------------------- When using array elements within a string you must enclose it in curly brackets, like this: print "<form method=\"POST\" name=\"update_workshop\" action=\"{$_SERVER['PHP_SELF']}\">\n"; HTH, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#136794) next »