note 57960 deleted from function.mt-rand by jome

From: Date: Thu, 20 Oct 2005 04:54:33 +0000
Subject: note 57960 deleted from function.mt-rand by jome
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-97277@lists.php.net to get a copy of this message
Note Submitter: rajakiit at comcast dot net Reason: useless ---- To generate a random password which is between 8 and 16 characters long, you could do this.... <?php $password = ""; $length = mt_rand(8, 16); for ($counter = 0; $counter < $length; $counter++) { $password .= chr(mt_rand(35, 126)); } ?>

« previous php.notes (#97277) next »