Hello friends. I want the output of my quesry to be formatted such that afdter every 7th output, the 8th one should start on a new row in ythe tabel. I have written the following code but does not work. Can someone please help?
Quote : <?php while($row=mysql_fetch_array($result)){ $i=$i+1; if ($i==7){ Print "</tr><tr>"; Print"<td width=\"150\" w>"; Print "<a href=\"findbycategory.php?"."CategoryId=".$row["CategoryId"] ."\"><font color=\"#000040\" size=\"2\">$row[CategoryName]</font></a>"." "; Print "</td>"; }else{ Print "<tr>"; Print"<td width=\"150\" w>"; Print "<a href=\"findbycategory.php?"."CategoryId=".$row["CategoryId"] ."\"><font color=\"#000040\" size=\"2\">$row[CategoryName]</font></a>"." "; Print "</td>"; if ($i==6){ Print "</tr>"; }} } ?> Unquote Thanks Denis