Código PHP:
<?php
$factor = 60;
$count =0;
$total_rows = mysql_num_rows($consulta);
$exacto = ($total_rows % $factor == 0)?true:false;
while($fila=mysql_fetch_object($consulta)){
if($count % $factor==0){
echo 'encabezado'.<br/>;
echo '</table><br/><table border="1">
<tr>
<th>titulo tabla</th
</tr>
';
}
?>
<tr>
<td><?php echo $fila->Id_producto?></td>
</tr>
<?php
$count++;
}
?>