How to get a fixed length string without using the rand() function?
I have this but I do not want to use the rand() function
function generateRandomString($length =6) {
    $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($j = 0; $j < $length; $j++) {
        $randomString .= $characters[mt_rand(0, $charactersLength - 1)];
    }
  return $randomString;
 }
 
     
     
     
     
    