Generate random letter in php
Use the following PHP code to generate a random letters.

<?php
for($i=0;$i<5;$i++)
$let[$i] = randLetter();
function randLetter()
{
$int = rand(0,51);
$a_z = " 1234567890abcdefghijklmnopqrst uvwxyzABCDEFGHIJKLMNOPQRSTUVWX YZ";
$rand_letter = $a_z[$int];
return $rand_letter;
}
$word = implode('',$let);
echo $word;
?>

<?php
for($i=0;$i<5;$i++)
$let[$i] = randLetter();
function randLetter()
{
$int = rand(0,51);
$a_z = "
$rand_letter = $a_z[$int];
return $rand_letter;
}
$word = implode('',$let);
echo $word;
?>
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment