I have a Function to generate random string ,it produce more than 1 random string ,but how to separate them
Function generatorstring($count) {
$karakter = '0123456789abcdefghijklmnopqrstuvwxyz';
$length = 7;
$randomString = '';
for ($i=0; $i <$count ; $i++) {
for ($ia = 0; $ia < $length; $ia++) {
$randomString .= $karakter[rand(0, strlen($karakter) - 1)];
}
}
return $randomString ;
}
echo generatorstring(3);
I expected result like this
'As6s8Xs',
'zE71jnM',
'ak9a71b',
But, its only produce 1 line of random string.