note 25418 deleted from function.rand by aidan
| From: | aidan@php.net | Date: | Sat, 10 Jul 2004 02:33:40 +0000 |
| Subject: | note 25418 deleted from function.rand by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72962@lists.php.net to get a copy of this message | ||
Note Submitter: hehe@yahoo.com
----
function randomNum($numDigits)
{
if ($numDigits <= 0)
return(0);
for ($i=1; i <= $numDigits; ++i) {
$val .= rand(0,9);
}
return($val);
}
But then again, if i stuck a microphone up to my butt and farted, and measured the frequency then
fed it into a rand() $numdigit times it'll be real random