Re: random numbers help
| From: | Richard Lynch | Date: | Fri, 05 Oct 2001 19:38:49 +0000 |
| Subject: | Re: random numbers help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70191@lists.php.net to get a copy of this message | ||
You should call mt_srand((double) microtime() * 1000000) once, and only
once, in any given script.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Nikola Veber <veber@ptt.yu>
Newsgroups: php.general
To: php forum <php-general@lists.php.net>
Sent: Thursday, October 04, 2001 6:57 PM
Subject: random numbers help
> Hi !
> I'm having troubles with the random numbers. When I create a number witm
mt_rand()
> I always get the same number on my local server. I need this stuff to
ranomly display
> some text, and I'd like to have another value of the random number each
time the
> page is refreshed.
>
> Thanks
> Nikola
>
>