i am having trouble with a function i made
Code: Select all
function randLetter()
{
$int = rand(0,23);
$a_z = "ABCDEFGHJKMNOPQRSTUVWXYZ";
$rand_letter = $a_z[$int];
return $rand_letter;
}
function randNumb()
{
$int = rand(0,8);
$a_z = "123456789";
$rand_letter = $a_z[$int];
return $rand_letter;
}i have them in a foreach loop. it works for the first one and then when it goes to do the 2nd one i get this error.
Fatal error: Cannot redeclare randLetter() (previously declared in script.php)
anybody got any suggestions on how i can make it work?
thank you