I have a code from auto generating passwords and i want to produce up to 40 times of random passwords and displaying it into a new line.
$num = 0;
while($num != 40){
$alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789";
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
for ($i = 0; $i < 8; $i++) {
$n = rand(0, $alphaLength);
$pass[] = $alphabet[$n];
}
print_r ($pass);
echo implode("<br>",$pass);
$num++;
}
the code separates the array per strings into new line. I need to display a strings with 8 characters up to 40 times per line.