Help to make tables please.
| From: | Denis L. Menezes | Date: | Wed, 12 Feb 2003 14:37:13 +0000 |
| Subject: | Help to make tables please. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135308@lists.php.net to get a copy of this message | ||
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