note 22283 added to function.rand
| From: | php-general at lists dot php dot net | Date: | Wed, 12 Jun 2002 20:10:46 +0000 |
| Subject: | note 22283 added to function.rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31760@lists.php.net to get a copy of this message | ||
erm.
so far as i can see (just a bit beyond my monitor), windows is limited to random numbers between
-32767 and 32767.
now if you want to have a rand in a bigger range, why not make a function that repeatedly calls
rand() and adds the return values till it finds a number in your range? (and then say, for a random
number of times between 1 and 5, adds a random number between 1 and 10) ?
--
http://www.php.net/manual/en/function.rand.php
http://master.php.net/manage/user-notes.php?action=edit+22283
http://master.php.net/manage/user-notes.php?action=delete+22283
http://master.php.net/manage/user-notes.php?action=reject+22283