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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -