note 10419 deleted from function.array-rand by sniper
| From: | sniper@php.net | Date: | Fri, 06 Jun 2003 19:47:34 +0000 |
| Subject: | note 10419 deleted from function.array-rand by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49908@lists.php.net to get a copy of this message | ||
Note Submitter: pianocomposer@hotmail.com
----
(formerly ssmith@personalcarehmo.com)
Some people are having difficulty getting the above example to work. It really does work! Try
calling function fake_rand_array() with the following code (I may eat crow later if this turns out
to be the wrong advice, but it worked on MY system!!):
$name = array
('Sam','Betty','Jack','Jane','Jill','John
Tesh');
$rand_name = fake_array_rand ($name);
print "Here are the six names (no repeats) randomly ordered:<br>\n";
// just go thru all six of them randomly
for($i=0;$i<6;$i++){
print $name[$rand_name[$i]];
print "<br>\n";
}