Stuck in UNIT 5 Exercice 7 Loop Foreach


#1



Basically, I believe my code is correct and the result shows correctly but the error message insists its no good...what can i do to bypass the exercice and move on?


https://www.codecademy.com/fr/courses/web-beginner-fr-FR-z5c81/0/7?curriculum_id=53710371fed2a8c7e9000001


The error message is :
Oups, merci de réessayer. Il semble que votre boucle n'affiche pas 'les 10... '.

Oops, try again, Looks like your loop does not show 'les 10... '.


<html>
  <head>
    <title></title>
  </head>
  <body>
    <p>
      <?php
        $yardlines = array("Les 50... ", "les 40... ",
        "les 30... ", "les 20... ", "les 10... ");
        // Ecrivez votre boucle foreach sous cette ligne
        
        
        // Ecrivez votre boucle foreach au dessus de cette ligne
        foreach ($yardlines as $yardline) {
          echo $yardline;
          }
      ?>
    </p>
  </body>
</html>


#2

Don't forget to echo "Gagné !"; as you cross the goal line :slight_smile:


#3

As simple as that ! Thanks a million !


#4

hi! my IDE is stopped when i started the for loops.help me please


#5

<?php
$yardlines = array("The 50... ", "the 40... ",
"the 30... ", "the 20... ", "the 10... ");

    // Write your foreach loop below this line
  foreach($yardlines as $touchdown!) {
  echo "<br> $lines </br>";
  unset $lines; }
    // Write your foreach loop above this line
    echo "$touchdown!";

  ?>

Yaaayeee it works....:grin: