MultiServis.Net //PHP El Kitabı

<<= Önceki Sayfa | PHP Ana Sayfa | Sonraki Sayfa =>>

MySQL tablosundan 4'er 4'er sekilde veri cekmek Yazar: Serkan Tarih: 01/04/02

<?php
//Olay burada basliyor :)

$numbers = range (1,20);
srand ((double)microtime()*1000000);
shuffle ($numbers);
//Ne yaratmisiz bakalim :)

while (list (, $number) = each ($numbers)) {
echo $number . "n";

}

//Just too lazy for "for loop" hehe :)
$ilk_dort = array($numbers[0],$numbers[1],$numbers[2],$numbers[3]);
$ikinci_dort = array($numbers[4],$numbers[5],$numbers[6],$numbers[7]);
$ucuncu_dort = array($numbers[8],$numbers[9],$numbers[10],$numbers[11]);
$dorduncu_dort = array($numbers[12],$numbers[13],$numbers[14],$numbers[15]);
$besinci_dort = array($numbers[16],$numbers[17],$numbers[18],$numbers[19]);

echo "<BR>";

while (list (, $number) = each ($ilk_dort)) {
echo $number . "n";

}

echo "<BR>";

while (list (, $number) = each ($ikinci_dort)) {
echo $number . "n";

}

echo "<BR>";

while (list (, $number) = each ($ucuncu_dort)) {
echo $number . "n";

}

echo "<BR>";

while (list (, $number) = each ($dorduncu_dort)) {
echo $number . "n";

}

echo "<BR>";

while (list (, $number) = each ($besinci_dort)) {
echo $number . "n";

}

?>

Ornek Dosyalar

http://www.turk-php.com/ornekler/gruplama.php

http://www.turk-php.com/ornekler/gruplama.php

Serkan Hadi Ceylani
serkan@turk-php.com

<<= Önceki Sayfa | PHP Ana Sayfa | Sonraki Sayfa =>>