Answers for "Write a PHP script that generates a 6 digit password from the given string without using random function? Password string: ‘7832619AGHETYUIOkljgffdqmzx’"

PHP
5

auto generate password in php

function rand_string( $length ) {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    return substr(str_shuffle($chars),0,$length);
}

echo rand_string(8);
Posted by: Guest on June-27-2020

Code answers related to "Write a PHP script that generates a 6 digit password from the given string without using random function? Password string: ‘7832619AGHETYUIOkljgffdqmzx’"

Browse Popular Code Answers by Language