<?php
$say = "1";
$result=mysql_query("SELECT * from karne where kullanicino='$kullanicino' and sinif='$sinif' and denemeno='$denemeno' order by soruno asc limit 0,20");
while ($a = mysql_fetch_array($result)) {
$say++;
?>
<tr>
<th scope="row"><?php echo $say;?></th>
<th scope="row">
<a href="/uyelik/deneme.php?sinif=<? echo $sinif;?>&denemeno=<? echo $denemeno; ?>&username=<? echo $username; ?>&soruno=<?php echo $say; ?>&kullanicino=<? echo $kullanicino; ?>" class="highlightit" ><img src="/gununsorusu/upload/<? echo $a[resim];?>" border="0"></a></th>
</tr>
<?php
}
?>Yukardaki sorguda ; soruno 0. kayittan baslar soruno 20 ye kadar devam eder yani yukardaki html kodlarini 20 defa basar. sende burada 20 defa basmişssin(belki daha fazla ortalama 20). biz bunu while ile yaptik.
daha da acmak gerekirse ;
0,1 = 0. kayittan basla 1 kayit al
1,1 = 1. kayittan basla 1 kayit al
2,1 = 2. kayittan basla 1 kayit al
.....
.....
19,1 = 19. kayittan basla 1 kayit al
----------------------------------------
Toplam 20 kayit.
benim yaptigim while da sorguyu 20 defa döndürecek
anlatabilmişimdir umarim