note 40115 added to function.srand
| From: | hurrajag at hotmail dot com | Date: | Sun, 22 Feb 2004 10:32:30 +0000 |
| Subject: | note 40115 added to function.srand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65530@lists.php.net to get a copy of this message | ||
I strongly suggest that you use the time() function to do this;
<?php
srand(time());
echo rand();
?>
This is to be used since time() is always changing and is never the same twice.
----
Manual Page -- http://www.php.net/manual/en/function.srand.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40115
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40115&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40115&report=yes
Search -- http://master.php.net/manage/user-notes.php