Here is the second part of my problem. I’m also having trouble converting this “while loop” into a “for loop”, any help ,again, would be greatly appreciated. Thanks!
[php]while ($count < 1000) {
$rolls = 1;
while (mt_rand(1, 6) != 6) {
$rolls++;
}
$total += $rolls;
$count++;
$max_rolls = max($rolls, $max_rolls);
}
$average_rolls = $total / $count;[/php]