<HTML>
<BODY>
<TABLE Border=1>
<TR>
<?PHP
FOR($intCounter = 1;$intCounter <= 9;$intCounter++)
{
PRINT("<TD>$intCounter</TD>");
IF($intCounter % 3 == 0)
PRINT("</TR><TR>");
}
?>
</TR>
</TABLE>
</BODY>
</HTML>
while ($a_row=mysql_fetch_assoc($qery00))
{
شرط for هم میشه یه متغییر مثل $i که تقسیمش بر عدد مثلا 3 شرط رو برقرار میکنه!
سادست یکم فکر کنید مینویسید. وگرنه بگید کاملش کنم.
$num_row = mysql_num_rows($qery00);
while ($a_row=mysql_fetch_assoc($qery00))
{
echo " <table border=0 width=25% align=center dir=rtl cellpadding=0 cellspacing=0>";
echo " <tr><td>
echo " <font size=2 color=#A4A2A2>". $a_row["kala"]."</font></td></tr>;
echo "<tr> <td> ";
echo " <font size=2>".$a_row["comment_kala"]."</font>";
echo " </td>";
echo "</tr></table>";
}
$num_row=mysql_num_rows("$qery00");
$temp=0;
$i=0;
while($a_row=mysql_fetch_assoc($qery00))
{
$data[]=$a_row;
}
echo "<table>";
while($temp<=$num_row){
echo "<tr>";
$j=$temp+2;
for($i=$temp;$i<=$j;$i++){
echo "<td>";
echo "<font size=2 color=#A4A2A2>".$data[$i]["kala"]."</font>";
echo "<font size=2>".$data[$i]["comment_kala"]."</font>";
echo "</td>";
}
echo "</tr>";
$temp=$temp+3;
}
echo "</table>";