0

//the code

    function generatekey($length){

 $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

 $charactersLength = strlen($characters);

 $randomString = '';

 for ($i = 0; $i < $length; $i+++){

     $randomString .= $characters[rand(0, $charactersLength - 1)];

 }

 return $randomString;

}

//why it not work

aynber
  • 20,647
  • 8
  • 49
  • 57

0 Answers0