RE: [PHP] Random number generation...

From: Date: Wed, 02 May 2001 12:53:19 +0000
Subject: RE: [PHP] Random number generation...
Groups: php.general 
Request: Send a blank email to php-general+get-51132@lists.php.net to get a copy of this message
Wotcha Tris :-) Try this: mt_srand((double)microtime()*1000000); $my_random_number = mt_rand(1, 20); HTH Jon -----Original Message----- From: Tristan.Pretty@risk.sungard.com [mailto:Tristan.Pretty@risk.sungard.com] Sent: 02 May 2001 12:07 To: php-general@lists.php.net Subject: [PHP] Random number generation... Hi there, A potentially dumb question here. Is there an easy way to display a random number between 1 and 20? I have looked on line, but either I am looking inall teh wrong places, or there isn't this script on-line. Can anyone point me in the right direction? Cheers, Tris... ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ********************************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net ********************************************************************** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' **********************************************************************

« previous php.general (#51132) next »