Reply to Re: Pseudo Random Sequence

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация