note 57401 deleted from function.rand by mazzanet
| From: | mazzanet@php.net | Date: | Mon, 03 Oct 2005 09:51:51 +0000 |
| Subject: | note 57401 deleted from function.rand by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96279@lists.php.net to get a copy of this message | ||
Note Submitter: thegritch at wanadoo dot fr
----
To show a random key in an array :
$source =
array('12','23','27','29','31','65');
for ($i=0;$i<20;$i++){
$key=rand(0,count($source)-1);
echo $source[$key]."<br>" ;
}
have a nice day (^_^)