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 -

java - Play! framework 2.0: How to display multiple image? -

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