lundi 18 mai 2020

how to remove random string function returns E+ ... characters

I have php function and i want to get 8 random string (only numbers and words) when i loop it returns many strings inside E+ , or , like chars ,

How can i remove thats ? I want only words and numbers length 8

My function here;

function g_str($str = 8){
    return bin2hex(@mcrypt_create_iv(ceil($str/2), MCRYPT_DEV_URANDOM));
}

Thanks !




Aucun commentaire:

Enregistrer un commentaire