Variables within a string
| From: | webapprentice | Date: | Mon, 11 Mar 2002 03:09:21 +0000 |
| Subject: | Variables within a string | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87947@lists.php.net to get a copy of this message | ||
Hello,
When I try to do this:
$foo = "Entry for for $HTTP_POST_VARS[\"name\"]";
I receive this error:
Parse error: parse error, expecting
T_STRING' or T_VARIABLE' or
`T_NUM_STRING' on line X
Why does it do this, and how do I get around this, besides assigning the
value of $HTTP_POST_VARS[\"name\"] to variable $bar?
Thank you for your time and help.
--Stephen