"; if ($current_toss == 1){ $heads = $heads + 1; } if ($current_toss == 2){ $tails = $tails + 1; } $z = $z + 1; } echo "we tossed the coins $tosses times
"; echo "Heads $heads
"; echo "Tails $tails
";