I saw that there is another thread addressing this problem, but reading through it didn't help me solve my problem.
I am a brand new newbie. I am taking a class which utilizes Ellie Quigley's PHP and MySQL by Example, printed in 2007. For those who may have the book, this is Example 4.4 on page 64.
I am getting the following error:
Parse error: syntax error, unexpected $end in /home/user/public_html/directory/example4.4.php on line 21
Here is the code, exactly as it is in the book except for one typo which I fixed. I'm pretty sure the typo I fixed isn't causing the problem:
<?php
$bgcolor="darkblue";
$tablecolor="yellow";
print <<<MY_BOUNDARY
<html><head><title>heredoc</title></head>
<body bgcolor="$bgcolor">
<table border="1" bgcolor=$tablecolor>
<tr><th>Author</th><th>Book</th></tr>
<tr>
<td>Marcel Proust</td>
<td>Remembrance of Things Past</td>
</tr>
<tr>
<td>Charles Dickens</td>
<td>Tale of Two Cities</td>
</tr>
</table>
</body>
</html>
MY_BOUNDARY;
?>
The typo I fixed was in the table header row, the book didn't have a close > on one of the </th> tags.
I've typed this code in three times--If I am introducing an error then I've done it all three times.
Any hints or clues would be most appreciated.
--Cymy