Noonga
02-24-2012, 07:25 AM
Does anyone know why I am not getting a new HTML table <TR> after 8 products, with this code? I can't figure it out. :shrugs:
while ($row = mysql_fetch_assoc($result)) {
echo '
<TD>
<A href="/products/'.$row['id'].'/">'.$row['id'].'</A>
</TD>
';
$listing++;
if ($listing == 8) {
echo '
</TR>
<TR>
<TD>
<BR>
</TD>
';
$listing = 0;
}
}
while ($row = mysql_fetch_assoc($result)) {
echo '
<TD>
<A href="/products/'.$row['id'].'/">'.$row['id'].'</A>
</TD>
';
$listing++;
if ($listing == 8) {
echo '
</TR>
<TR>
<TD>
<BR>
</TD>
';
$listing = 0;
}
}