English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

It keeps saying the error is on line 7 buti dont know whats wrong with it.



My Movie Site


define(“FAVMOVIE”, “The Life of Brian”);
echo “My favorite movie is “;
echo FAVMOVIE;

?>

2007-03-03 16:08:46 · 3 answers · asked by ant_rite 2 in Computers & Internet Programming & Design

This was the error
Parse error: syntax error, unexpected T_STRING in C:\Program Files\xampp\htdocs\movie.php on line 7

2007-03-03 16:39:17 · update #1

3 answers



My Movie Site



define(FAVMOVIE , "The Life of Brian");
echo "My favorite movie is ";
echo FAVMOVIE;

?>



Olha cara é algum problema relacionado com as "(quotes)
(understand?)
Agora está certo ( All right )
Boa sorte com seus estudos em PHP,já passei por esses problemas (Good Luck !!! ).

2007-03-03 16:40:52 · answer #1 · answered by wileao 6 · 0 0

The error occurred because you have used an incorrect symbol. While I coppied this code and pasted in Zend Editor, it showed me “ (I can't recognize this symbol) instead of " (double quote) on line 7 and 8. When I replaced your symbol with double quotes, the code worked fine. The following code worked fine with me.



My Movie Site


define(FAVMOVIE,"The Life of Brian");
echo "My favorite movie is ";
echo FAVMOVIE;
?>

2007-03-06 19:19:09 · answer #2 · answered by Atif Majid 3 · 0 0

First, what error was it? Knowing the exact message would have been very helpful. The only problem I see is that you have used curly quotes. Did you write that with Word? If that's the case, switch to a plain text editor (Notepad will do for now) and put straight quotes around all the strings. And for the future, get a programmer's text editor, such as Notepad++.

2007-03-03 16:35:22 · answer #3 · answered by felixp7 2 · 0 0

fedest.com, questions and answers