Generting random (alphanumeric) string in PHP [duplicate]
Possible Duplicate:
Generating (pseudo)random alpha-numeric strings
How to genearte random string in PHP? Numbers are not a problem, but how to deal with letters efficiently?
You might be best of using the normal random function in combination with chr
From the php manual comments: http://php.net/manual/en/function.chr.php
<?php
for($i=0; $i<7; $i++){
$random_string .= chr(rand(0,25)+65);
}
echo $random_string;
?>
精彩评论