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:
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:
[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:
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
--
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
5 matches
Mail list logo