Generate a random string from the given array of letters.
Parameters | |||
---|---|---|---|
int
|
$length = 5 |
The length of required random string |
# |
array
|
$letters = [] |
Array of letters from which randomized string is derived from. Default is a to z and 0 to 9. |
# |
string
|
$prefix = '' |
Prefix to the generated string |
# |
Returns | |
---|---|
string
|
The random string of required length |