posted on Sep 28, 2009 at 9:46 a.m. EDT in
<?php
$numeros = array();
$numBolas = $_POST['escolha']; // Quantidade de numeros apostados
while(count($numeros) < $numBolas) {
do {
$random = rand(1,60);
} while(in_array($random,$numeros));
$numeros[] = $random;
}
echo "Os números da sorte são: ";
sort($numeros);
foreach($numeros as $resultado)
echo $resultado." ";
?>
<a href = "index.php">Voltar</a>
php
1
<?php
$numeros = array ();
$numBolas = $_POST [ 'escolha' ]; // Quantidade de numeros apostados
while ( count ( $numeros ) < $numBolas ) {
do {
$random = rand ( 1 , 60 );
} while ( in_array ( $random , $numeros ));
$numeros [] = $random ;
}
echo "Os números da sorte são: " ;
sort ( $numeros );
foreach ( $numeros as $resultado )
echo $resultado . " " ;
?>
<a href = "index.php">Voltar</a>
copy
|
embed
Hey there! I see you're running Internet Explorer 6.
That's neat. This reminds me of my grandpa. He had this old car that he kept having to fix. He spent so much money on it that he didn't want to get rid of it (even when it stopped running).
You guys should hang out.
Here's a free sports car from Snipt.
0 Comments