generate a meaningful random string using php
I would like to generate a random string with meaningful word
function randString($length, $charset='abcdefghijklmnopqrstuvwxyz'){
$str = '';
$count = strlen($charset);
while ($length--) {
$str .= $charset[mt_rand(0, $count-1)];
}
return $str;
}
I have used this function but it generate random which has not any meaning
in dictionary. Have you any idea or is it not possible. Please let me know
if you have any idea according or have better solution regarding.
Thanks in advance.
No comments:
Post a Comment