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
split should work fine... Just do something like:
$teamMembersArray = split( ,;, $textarea);
That will give you an array of the team members. Of course I'm assuming
that their names don't include spaces and that you'll separate them with
either a space, comma, or semi-colon. And you'll want
yes. you can. ;)
--
Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
Hawk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have a group table with 16 items, and I want them to be randomly
oh, thank you very much :P
George Nicolae [EMAIL PROTECTED] skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
yes. you can. ;)
--
Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
Hawk [EMAIL
[..]
is there any way to limit to 4 in each group without 47839 rows of
code?
[..]
yes. you can. ;)
[..]
oh, thank you very much :P
[..]
This might be a bit more helpful ;) There are several way to do it, this
is just one. Unoptimised, aimed at readability.
?php
// Split $items equally
9 matches
Mail list logo