Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function numerosLoto () {
- // Déclarer les variables d'abord
- $numerosLoto = [];
- // Ajouter 5 fois un numéro entre 1 et 49 au tableau
- for ($i; $i < 5; $i++) {
- $numerosLoto[] = mt_rand(1, 49);
- }
- // Ajouter un numéro entre 1 et 10 au tableau
- $numerosLoto[] = mt_rand(1, 10);
- // Renvoyer le résultat
- return $numerosLoto;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement