note 24672 deleted from function.mt-rand by betz
| From: | betz@php.net | Date: | Mon, 18 Nov 2002 11:13:18 +0000 |
| Subject: | note 24672 deleted from function.mt-rand by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39632@lists.php.net to get a copy of this message | ||
in response to All-yvg@ukr.net on 10-Jul-2002 06:17:
$i=0; while ($i<10) { $arr[$i]=$i; $i++; }
srand ((float)microtime()*1000000);
shuffle ($aFilenames);
while (count($arr)>0) { echo array_shift($arr) }
this "randomizes" the elements in the array then pulls off and prints out each array value
-- essentially listing every item in the array only once.