Bug in For- Loops in PHP


I confirmed a little bug in this exercice. The code let's me pass, but the output is wrong. Current Output:
The 50... touchdown!the 40... touchdown!the 30... touchdown!the 20... touchdown!the 10... touchdown!

The exercice doesn't care if your second echo is inside the foreach- loop, and that's a pretty big problem, I guess?

        $yardlines = array("The 50... ", "the 40... ",
        "the 30... ", "the 20... ", "the 10... ");
        // Write your foreach loop below this line
        // Write your foreach loop above this line
        foreach ($yardlines as $yards) {
            echo $yards;
            echo "touchdown!";


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.