| Information | | Member Group: | User | | Member Title: | No Information | | Home Page: | No Information | | Birthday: | No Information | | Location: | No Information | | Interests: | No Information |
| | Avatar | |  |
| | | Communicate | | Email: |  | | MSN Identity: | No Information | | Yahoo Identity: | No Information | | ICQ Number: | No Information | | Private Message: |  |
| | | <( back ) |
|
Dado
function genrnd($max=20) {
$numero_casuale = rand(1,$max);
return $numero_casuale;
}
if (isset($_POST['tira']) && $_POST['tira']==true){
$numero = genrnd(20); // NOTA, avendo specificato nella definizione della funzione il valore di default $max=20, aver specificato 20 nella chiamata è ridondante
}
?>
Risultato: echo $numero; ?>