note 13844 deleted from function.array-rand by aidan
| From: | aidan@php.net | Date: | Tue, 18 Oct 2005 05:27:48 +0000 |
| Subject: | note 13844 deleted from function.array-rand by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-97133@lists.php.net to get a copy of this message | ||
Note Submitter: martinNOSPAM at franz63 dot de
----
If you dont need *serious* random numbers, for e.g. a simple banner rotation you may do something
like this:
<br>
$rand_key = date("s") % sizeof($myarray);
<br>
this will rotate through the array every second. It is easier and faster than the random number
generator.
<br>You may also use REMOTE_PORT or the Process-Id to get a more randomized number