I am attempting to build a PDF based on the information in a database that I have. I am getting a 500 internal server error when I do. The code that is throwing the error is:
<?php
include('db.php');
$pdfArray = array();
$top = '<h1>Med One Equipment List</h1>
<table>
<thead>
<tr>
<td>Manufacturer</td>
<td>Model</td>
<td>Description</td>
</tr>
</thead>
<tbody>
';
array_push($pdfArray, $top);
while($rowAll = mssql_fetch_array($allResult)) {
$html = '
<tr>
<td>'.$rowAll["Manufacturer"].'</td>
<td>'.$rowAll["Model"].'</td>
<td>'.$rowAll["Make"].'</td>
<tr>';
array_push($pdfArray, $html);
}
$bottom = '</tbody>
</table>';
array_push($pdfArray, $bottom);
$table = implode(" ", $pdfArray);
$html = <<<EOF
{$table}
EOF;
?>
I am just including this file when I build my PDF with TCPDF. Let me know if I need to include some of the TCPDF code. I can't for the life of my figure out why it won't work. My guess is that I'm using herdoc incorrectly.