note 86163 deleted from function.rand by tularis
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: niepamietamnazwy at gmail dot com
----
for Random string...
<?php
function random_string($numofletters) {
$v="";
for($i=0;$i<$numofletters;$i++){
if(rand(0,1)==1) {$v.=chr(rand(65,90));}
else {$v.=rand(0,9);}
}
return $v;
}
?>
hope it help.