For starters, quit using print, that is old style and soon will be obselete.
I will use a portion of your code for example:
if($id != "") {
echo "
<tr>
<td class=\"menuheader\" colspan=\"4\">Content Details</td>
</tr>
<tr>
<td class=\"lists\" colspan=\"4\">
<table width=\"98%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\">
<tr>
<td colspan=\"3\">
";
}
when commenting your code, do not place it inside of an print or echo.
print("<!-- Content Details Table: Write everything below this line --!>");
/* Content Details Table: Write everything
below this line */
or
// Content Details Table: Write everything below this line