if ($pictureid == 0){
}
else {
$Dive_list_fields .= <<<__HTML_END
<a href="display2.php?id=$pictureid"><img src="bphoto/thumbv_$pictureid.jpg" width="35" height="25"></a>
__HTML_END;
}
$Dive_list_fields .= <<<__HTML_END
</td>
Your error I think is in this block. At your heredoc. A heredoc cannot be indented.
Yours is at _HTML_END;
Replace that block with :
if ($pictureid == 0){
}
else {
$Dive_list_fields .= <<<__HTML_END
<a href="display2.php?id=$pictureid"><img src="bphoto/thumbv_$pictureid.jpg" width="35" height="25"></a>
__HTML_END;
}
$Dive_list_fields .= <<<__HTML_END
</td>
and make sure there is no space before the heredoc at all or it will throw a parse error at the end of your code.