RE: [PHP] Random number generation...

From: Date: Wed, 02 May 2001 13:04:07 +0000
Subject: RE: [PHP] Random number generation...
Groups: php.general 
Request: Send a blank email to php-general+get-51138@lists.php.net to get a copy of this message
The manual also says: mt_rand -- Generate a better random value I've been using mt_rand() over rand() every time - is there any reason not to? Cheers Jon -----Original Message----- From: elias [mailto:elias_bachaalany@yahoo.com] Sent: 03 May 2001 00:05 To: php-general@lists.php.net Subject: Re: [PHP] Random number generation... why not use the rand() ? manual says: rand -- Generate a random value Description int rand ([int min [, int max]]) If called without the optional min, max arguments rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use rand (5, 15). Remember to seed the random number generator before use with srand(). -elias http://eassoft.cjb.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 (#51138) next »