Reply to Re: rand() and mt_rand()

Your name:

Reply:


Posted by Iain on 10/03/05 12:31

v4.3.3.3 on Windows (IIS 5.1) and v4.3.11 in Linux (Apache 1.3.29).

..../Iain



"Oli Filth" <catch@olifilth.co.uk> wrote in message
news:NOY%e.9076$OC3.6205@newsfe5-win.ntli.net...
> 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

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