|
Posted by Ewoud Dronkert on 11/10/05 20:36
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
Navigation:
[Reply to this message]
|