[PHP] Re: Randomize an array?

2005-03-07 Thread M. Sokolewicz
Brian Dunning wrote: I have a Magpie RSS feed in an array, and I want to output it in random order. What's the best (fastest) way to do this? - Brian easiest: array_rand() http://www.php.net/array_rand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Randomize an array?

2005-03-07 Thread Brian Dunning
On Mar 7, 2005, at 7:40 AM, M. Sokolewicz wrote: array_rand() But that's likely to give me the same element more than once. I want to output the entire array but in a random order, like a shuffled deck of cards. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Re: Randomize an array?

2005-03-07 Thread Jay Blanchard
[snip] array_rand() But that's likely to give me the same element more than once. I want to output the entire array but in a random order, like a shuffled deck of cards. [/snip] Wow,. http://www.php.net/shuffle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Randomize an array?

2005-03-07 Thread Rick Fletcher
Brian Dunning wrote: On Mar 7, 2005, at 7:40 AM, M. Sokolewicz wrote: array_rand() But that's likely to give me the same element more than once. I want to output the entire array but in a random order, like a shuffled deck of cards. like a shuffled deck of cards? http://www.php.net/shuffle --

Re: [PHP] Re: Randomize an array?

2005-03-07 Thread Brian Dunning
http://www.php.net/shuffle Boy do I feel stupid. Thanks!! :) I always RTFM and STFW before posting - but somehow did not search the PHP site for the word shuffle. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php