Pieter Lategan Posted July 3, 2011 Share Posted July 3, 2011 Hi I got this problem Parse error: syntax error, unexpected $end in C:\xampp\htdocs\chapter2\table2.php on line 26 I am not sure do you think I must also in this page connect to the database? <?php $movie_footer ="</table>"; $movie =<<<movie $movie_header $movie_details $movie_footer movie; echo "There are $num_movies movies in our database"; echo $movie; ?> Quote Link to comment https://forums.phpfreaks.com/topic/241017-syntax-error-unexpected-end-in/ Share on other sites More sharing options...
mikesta707 Posted July 3, 2011 Share Posted July 3, 2011 You aren't correctly ending your string with heredoc syntax. read this page: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc it shows how to correctly implement heredoc Quote Link to comment https://forums.phpfreaks.com/topic/241017-syntax-error-unexpected-end-in/#findComment-1237962 Share on other sites More sharing options...
Pieter Lategan Posted July 8, 2011 Author Share Posted July 8, 2011 Thank you so much for your help, I worked thru it and I find my problem Many thanks for the info. Quote Link to comment https://forums.phpfreaks.com/topic/241017-syntax-error-unexpected-end-in/#findComment-1240003 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.