<?php
while ($data=mysql_fetch_array($sorgu))
{
?>
<tr>
<th height="139" bgcolor="#FFFFFF" scope="row"><a href=urun.php?id=<?php echo "".$data[id].""; ?>><img height=139 src=fotolar/<?php echo "".$data[resmi].""; ?> ></a></th>
</tr>
<tr>
<th bgcolor="#FFFFFF" scope="row"><font face=Arial><b><center><?php echo "".$data[kod].""; ?></center></b></font></th>
</tr><?php } ?>Bu kodlarını şöyle değiştir
<?php
$sutun = 4;
echo "<tr>";
while ($data=mysql_fetch_array($sorgu)) {
echo "<td width=100%>";
echo "<table border=0 width=100% cellpadding=0 cellspacing=0><tr>";
echo "<th height=\"139\" bgcolor=\"#FFFFFF\" scope=\"row\"><a href=urun.php?id=".$data[id]."><img height=139 src=fotolar/".$data[resmi]."></a></th>";
echo "<tr>";
echo "<th bgcolor=\"#FFFFFF\" scope=\"row\"><font face=Arial><b><center>".$data[kod]."</center></b></font></th>";
echo "</tr></table>";
echo "</td>";
$sutun++;
if ($sutun == "4") {
echo "</tr><tr>";
$sutun=0;
}
}
?>Çalışması gerekiyor, 4 lü sütunlar halinde sıralar veriyi