hubbardude Posted September 11, 2007 Share Posted September 11, 2007 Very new to PHP, doing very basic stuff. I have a book which I copied this code from, so I don't understand why I'm getting an error. My installation is fine. Anyways, here's the code: <html> <head> <title>My Movie Site</title> </head> <body> <?php define (“FAVMOVIE”, “The Life of Brian”); echo “My favorite movie is “; echo FAVMOVIE; ?> </body> </html> The error I get is: Parse error: syntax error, unexpected T_STRING in C:\Apache2.2\htdocs\moviesite.php on line 7 Any help is appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/68928-syntax-error/ Share on other sites More sharing options...
pocobueno1388 Posted September 11, 2007 Share Posted September 11, 2007 You need to use normal double quotes. <html> <head> <title>My Movie Site</title> </head> <body> <?php define("FAVMOVIE", "The Life of Brian"); echo "My favorite movie is "; echo FAVMOVIE; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/68928-syntax-error/#findComment-346467 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.