note 71372 rejected from function.rand by nlopess
| From: | nlopess@php.net | Date: | Fri, 24 Nov 2006 21:49:28 +0000 |
| Subject: | note 71372 rejected from function.rand by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-120061@lists.php.net to get a copy of this message | ||
Note Submitter: mihai at bocsaru dot com
----
is there a way in which to declare let's say 20 different numbers, which are not chronologic
and have the random function pick up one number at a time?
at the moment i am using this code:
srand((double)microtime()*1000000);
$num = rand(846,1100);
include ('quote'.$num.'.html');
the issue with my code here is that some numbers between 846 and 1100 may not have a corresponding
web page, therefore i would like to declare all available html pages with numbers and use the rand
function or something else to use one at a time
any ideas?
many thanks in advance