note 36663 deleted from function.rand by aidan

From: Date: Sat, 11 Sep 2004 07:42:31 +0000
Subject: note 36663 deleted from function.rand by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76450@lists.php.net to get a copy of this message
Note Submitter: beantaxi at yahoo dot com ---- irt bkreleger -- while that will work, it would be simpler to just do function NumGen($length) { $limit = pow(10, $length); return rand(0, $limit); } Powers (and logs) of 10 are often useful when dealing with number-of-digit problems . . . - The Bean

« previous php.notes (#76450) next »