$x = 49; $y = 6; srand((double)microtime()*1000000); for ($i = 1 ; $i <= $x ; $i++) { $a[$i] = $i; } for ($j = 1 ; $j <= $y ; $j++ ){ $k = rand(1,($x + 1 - $j)); $num[$j] = $a[$k]; $a[$k] = $a[$x + 1 - $j]; $num[$j] = $num[$j]; $num[$j] = $num[$j]; } ?>
$rnum = 1;
do {
echo " ";
$rnum ++;
}
while ($rnum<7);
?>
|
| close window |