PHP newbie error:: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' -


the following line of code

 echo “<a href=’http: //localhost/moviesite.php?favmovie=stripes' > "; 

throws error

parse error: syntax error, unexpected t_string, expecting ',' or ';' 

any on im doing wrong here helpful. thanks!

your first double quote , single quote incorrect, should " , ':

echo "<a href='http://localhost/moviesite.php?favmovie=stripes'>"; 

on other hand think better (using " in html):

echo '<a href="http://localhost/moviesite.php?favmovie=stripes">'; 

more info php strings & quotes


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -