On Thu, 31 Jan 2002, Benjamin deRuyter wrote:

> I need to generate a random number (range is not crucial) and I have been
> trying to use mt_rand().  However, I am finding that is generates the same
> value EVERY time.  This is true whether I supple a range or not.  For
> example, the follow line of code generated 13 EVERY time...

27-Mar-2001 07:29

Don't forget to do mt_srand() before the mtrand() or you wil get the same
values every time you'll go back to the same page.Not when you refresh
the page, only when you open the page in a new browserwindow and the
history is empty.

http://www.php.net/manual/en/function.mt-rand.php

        ~Chris                           /"\
                                         \ /     September 11, 2001
                                          X      We Are All New Yorkers
                                         / \     rm -rf /bin/laden


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to