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; ?> 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 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. 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
Archived
This topic is now archived and is closed to further replies.