dimanche 30 octobre 2022

Generate different number in each loop [duplicate]

i generate random number in a loop. sometimes i have some problems because the same number is generated. how can i make every generated number be different.by the way, I only produce 11 numbers.

for ($j = 0; $j <= 100; $j++){
    $randCount = rand(0, 99);
    if ($j == 11) {
       break;
    }
}



Aucun commentaire:

Enregistrer un commentaire