Re: Re: Random

From: Date: Sat, 29 Jan 2005 19:05:33 +0000
Subject: Re: Re: Random
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-207684@lists.php.net to get a copy of this message
Leif Gregory wrote / napísal (a):
Hello SargeTron, Wednesday, January 19, 2005, 10:10:20 AM, you wrote: S> rand() only returns an int (number), but I would like something S> like dd75$6*, you know, containing any character. I would like it S> only to do a certain string ONCE, so there are no duplicates (in a S> for loop). Hopefully I won't need to do a huge array. Any S> suggestions? Take a look at this random e-mail address generator (hasn't everyone written one of these? <grin>) that I wrote a bit back. You should be able to see how to do exactly what you want from it. http://www.devtek.org/software/randmail/index.php $upperLowerNumber = rand(1,10); controls the so called seed for the script because I placed constraints on how often uppercase and numbers could appear. Cheers, Leif Gregory whatabout uniqid()?
trobi

« previous php.general (#207684) next »