php - For in random order no repeating numbers -
whats best way random "for" without repeating number?
for ($i = 1; $i <= 10; $i++) { echo $i; } i think ways complicated lot amount of code.. there standard function im willing?
$numbers = range(1,10); shuffle($numbers); foreach($numbers $i) { // stuff } that give numbers 1 10 no repetition in random order.
Comments
Post a Comment