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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -