Created
September 15, 2017 08:12
-
-
Save przor3n/4acb4168e11220fa033a7a0822337177 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generate_random($string) { | |
$charactersLength = strlen($string); | |
$randomString = ''; | |
for ($i = 0; $i < $charactersLength; $i++) { | |
$randomString .= $string[rand(0, $charactersLength - 1)]; | |
} | |
return $randomString; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment