Now, I want something to count the results and place a chunk of HTML below the third and fourth item, the seventh and eighth item, and so on.
Code: Select all
<?
$count = 1;
foreach ( $item_list as $id => $exp )
{
$a = get_classified($id);
{
?>
<TD valign=middle width="310">
<FONT FACE="arial" color="#000080" style='font-size:9.5pt; mso-bidi-font-size:9.5pt;font-family:Arial'><B><A onFocus="if(this.blur)this.blur()" href="get_item.php?id=<? print $a->ID; ?>">
<? print ($a->title); ?></a><BR></FONT></b>
<FONT FACE="arial" color="#7A5924" style='font-size:8.5pt; mso-bidi-font-size:8.5pt;font-family:Arial'><B>
<? print substr($a->description,0,60); ?>... <b><A onFocus="if(this.blur)this.blur()" href="get_item.php?id=<? print $a->ID; ?>">Details!</a>
<FONT FACE="arial" color="#000000" style='font-size:5pt; mso-bidi-font-size:5pt;font-family:Arial'><BR><BR></font>
</TD>
<? }
if($count == 2){
echo "</tr><tr>";
$count = 1;
}
else{
$count++;
}
}
echo "</tr>";
?>