note 85270 deleted from function.rand by felipe

From: Date: Fri, 22 Aug 2008 22:12:05 +0000
Subject: note 85270 deleted from function.rand by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143759@lists.php.net to get a copy of this message
Note Submitter: mrwolf2727 ---- If you want a random string of both numbers and letters, try this.... function gen_rand($len){ for($i=1;$i<=$len;$i++){ $set[0] = chr(rand(65,90)); $set[1] = chr(rand(48,57)); $rand = rand(0,1); $number .= $set[$rand]; } return($number); }

« previous php.notes (#143759) next »