Re: random within random array?
| From: | Bryan Koschmann - GKT | Date: | Mon, 21 Apr 2003 18:51:45 +0000 |
| Subject: | Re: random within random array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144691@lists.php.net to get a copy of this message | ||
Marek,
Thank you for your reply! I hope I am not further bothering you, however I
only seem to get numbers with this, I'm guessing the position in the
array? They are random though.
Any way to change this, or do I need to do some more research?
Thanks again for your time!
Bryan
On Mon, 21 Apr 2003, Marek Kilimajer wrote:
|Create 3 arrays:
|$first=array('a','b','c','d','e','f','g');
|$second=array('es','is','');
|$third=array('',"'","''","'''");
// single quotes within double
|
|repeat this as many times as neccessery:
|$parts[]=array_rand($first). array_rand($second).array_rand($third);
|
|create the whole string with spaces separating parts:
|$whole=implode(' ',$parts);
|
|>
|>the first set will be random characters from this group: