I would imagine the problem has something to do with those escaped quote marks, but in any case, you could probably get around it by doing this:
$foo = "Entry for " . $HTTP_POST_VARS["name"]; some correct me if I'm wrong -chris > -----Original Message----- > From: webapprentice [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 10, 2002 10:09 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Variables within a string > > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php