note 25418 added to function.rand

From: Date: Mon, 23 Sep 2002 11:15:18 +0000
Subject: note 25418 added to function.rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-37136@lists.php.net to get a copy of this message
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 -- http://www.php.net/manual/en/function.rand.php http://master.php.net/manage/user-notes.php?action=edit+25418 http://master.php.net/manage/user-notes.php?action=delete+25418 http://master.php.net/manage/user-notes.php?action=reject+25418

« previous php.notes (#37136) next »