|
Posted by Nel on 11/10/05 21:39
"Ewoud Dronkert" <firstname@lastname.net.invalid> wrote in message
news:8k47n1hqmodvvtiif2df2sioknd4n6i2h8@4ax.com...
> Philip Ronan wrote:
>> Seed the random number generator based on the day of the month and use
>> array_rand() to shuffle the contents
>
> Yep, only it's shuffle()...
> Gives the same results every time:
>
> $a = range('A', 'Z');
> for ( $i = 1; $i < 32; ++$i )
> {
> $b = $a;
> srand($i);
> shuffle($b);
> echo sprintf('%2d ', $i).implode(' ', $b)."\n";
> }
>
> --
> E. Dronkert
Thanks to you both for your advice - unless you've come across such a
feature before it's hard to know if such a thing is possible so easily.
Thanks again!!!
Nel.
Navigation:
[Reply to this message]
|