Re: Using rand() for 10 digit numbers????

From: Date: Fri, 05 Sep 2003 17:28:58 +0000
Subject: Re: Using rand() for 10 digit numbers????
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-161794@lists.php.net to get a copy of this message
Could be.... "Robert Cummings" <robert@wocmud.org> wrote in message news:1062780933.7427.17.camel@blobule.suds... > It probably wraps the standard C rand() function which only takes an > unsigned integer which is usually 16 bits. > > Cheers, > Rob. > > On Fri, 2003-09-05 at 12:34, Scott Fletcher wrote: > > Hi! > > > > I looked at the rand() at php.net which spoke about min and max random > > number. So, I use rand(0,9999999999) to get a 10 digit random number but it > > only return an 1 digit random number that is displayed at '0'. So, I tried > > rand(0,9999) with 4 digit random number and got the random number. So, why > > does it not work with 10 digit numbers? > > > > Scott F. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > .---------------------------------------------. > | Worlds of Carnage - http://www.wocmud.org | > :---------------------------------------------: > | Come visit a world of myth and legend where | > | fantastical creatures come to life and the | > | stuff of nightmares grasp for your soul. | > `---------------------------------------------'

« previous php.general (#161794) next »