note 59506 deleted from function.base64-encode by betz
| From: | betz@php.net | Date: | Thu, 09 Feb 2006 16:47:33 +0000 |
| Subject: | note 59506 deleted from function.base64-encode by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-103377@lists.php.net to get a copy of this message | ||
Note Submitter: amishmithani at hotmail dot com
----
To get unique values from rand, use the following recursive function.
function returnRand($patternArray){
$var = rand(1,15);
if(in_array($var,$patternArray)){
return returnRand($patternArray);
}else{
return $var;
}
}
for($a=0; $a < 4; $a++){
$pattern[] = returnRand($pattern);
}