Basta mover a tabela e as tags de cabeçalho para fora do loop.
Faça algo como:
<table>
<th></th> #define all table headers
for each item:
<tr>
<td>item info</td>...
</tr>
</table>
<table>
<th></th> #define all table headers
for each item:
<tr>
<td>item info</td>...
</tr>
</table>