Hello, would someone tell me what's wrong with this code? Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head><body>
<?php
//Print version
//Set at what record to break at
//probably 25-30 records per page
$BreakAT=25;
$num=0;
$pagenum = 1;
$totdue=0;
?>
<div class="display print">
<?php
foreach($rows as $row):
if($num % $BreakAT == 0)
{
if($num>0){ echo '</table class="print">';
echo '<div class="breakhere"></div>';
$pagenum++; }
echo date('m/d/y');
echo " Page " . $pagenum;
?>
<div class="title">Accounts Payable Report</div><br />
<table align="center" cellspacing=0 cellpadding=0 border=1>
<thead>
<tr>
<thead> <th colspan=4></th>
<th bgcolor="#ccffff">date</th>
<th bgcolor="#ccffff">days</th>
<th bgcolor="#ccffff">amt</th>
<tr>
<th bgcolor="#ccffff">recur?</th>
<th bgcolor="#ccffff">acct#</th>
<th bgcolor="#ccffff">creditor</th>
<th bgcolor="#ccffff">purpose</th>
<th bgcolor="#ccffff">due</th>
<th bgcolor="#ccffff">late</th>
<th bgcolor="#ccffff">due</th>
</tr>
</thead>
<?php
$totdue += $row['amtdue'];
echo '
<tr>
<td>' . $row['status'] . '</td>
<td>' . $row['acctno'] . '</td>
<td>' . $row['bname'] . '</td>
<td>' . $row['purpose'] . '</td>
<td>' . $row['duedate'] . '</td>
<td align=right class="currency">' . ($late > 120 ? 'pastdue' : $row['dayslate']) . '</td>
<td align=right class="currency">' . number_format($row['amtdue'], 2, '.', '') . '</td>
</tr>';
$num++;
endforeach;
echo '
<tr>
<th scope="row" colspan="6">Grand Total:</th>
<td bgcolor="#FFD4D4" class="currency">' . number_format($totdue, 2, '.', '') . '</td>
</tr>
</table>';
?>
</div></body></html>