Re: Random number generator
| From: | Gary M. Josack | Date: | Wed, 05 Nov 2008 18:55:37 +0000 |
| Subject: | Re: Random number generator | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282946@lists.php.net to get a copy of this message | ||
Stephen wrote:
On a php web page I want to generate a random number between say 1 and 10 and then use that number to reference a particular file in an include tag. <?php include('GeneratedNumber.html'); ?> Is there an easy way to do this?Get the time and use the last digit converting 0 to 10. Stephen rand(1, 10);