note 79620 deleted from ref.strings by ronabop

From: Date: Wed, 05 Dec 2007 23:09:04 +0000
Subject: note 79620 deleted from ref.strings by ronabop
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-132867@lists.php.net to get a copy of this message
Note Submitter: user at NOSPAM dot example dot com Reason: bad code ---- Here's my random string function: <?php function randStr($chars){ $dic = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"; $dict = explode($dic); $pw = array(); for($i=0;$i<$chars;$i++){ $numcount = count($dict); $randNum = rand(0,$numcount); $pw[$i] = $dict[$randNum]; echo($pw[$i]); } } ?> -V925

« previous php.notes (#132867) next »