Reply to Re: rand() and mt_rand()

Your name:

Reply:


Posted by Oli Filth on 10/03/05 01:03

Iain said the following on 02/10/2005 20:06:
> I have been using rand() and mt_rand() to give a bit of dynamic content to a
> site...basically selecting one of a number of pictures at random. Each
> refresh then gives a slightly differnt page as in...
>
> $picture = $images[mt_rand(0,2)];

> What I find is that on a Windows dev platform both rand() and mt_rand()
> *always* give the max value - 2 in this case - and on a Linux platform seem
> to have a 'preference' for the max value. Any ideas why? Neither seem must
> of a random function especially on Windows!
>

What version of PHP are you using?

--
Oli

[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

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