note 27525 added to function.getrandmax
| From: | steve at brainwashstudios dot com | Date: | Mon, 09 Dec 2002 21:53:46 +0000 |
| Subject: | note 27525 added to function.getrandmax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40630@lists.php.net to get a copy of this message | ||
a follow up to the above it seems to work most ways like this
<?php
$num = getrandmax();
$generate = rand(0,$num);
print ($generate);
?>
That worked fine in all my tests also might be a good way to generate session ids
--
http://www.php.net/manual/en/function.getrandmax.php
http://master.php.net/manage/user-notes.php?action=edit+27525
http://master.php.net/manage/user-notes.php?action=delete+27525
http://master.php.net/manage/user-notes.php?action=reject+27525