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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -