Re: rand()

From: Date: Thu, 14 Mar 2002 05:47:47 +0000
Subject: Re: rand()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88444@lists.php.net to get a copy of this message
Just do the obvious: $rand = rand(33,111); $num = ($rand>90) ? $rand+35 : $rand; On Wed, 13 Mar 2002, Jeff Sittler wrote: > I am wanting to use rand() to generate a number between 33-90 OR 125-146. > Is there a way to do this? I don't want any numbers before 33 or between > 91-124 or after 146. Could someone point me in the direction I need to look > to accomplish this. > > Thanks, > Jeff > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#88444) next »