public function randomString($length) {
$key = '';
$keys = array_merge(range(0, 9), range('a', 'z'));
for ($i = 0; $i < $length; $i++) {
$key .= $keys[array_rand($keys)];
}
return $key;
}
```
Created
July 27, 2018 14:55
-
-
Save andrit/73768f299e6da850e6a494e373136362 to your computer and use it in GitHub Desktop.
simple php random string generator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment