This forum is now read-only. Please use our new forums at discuss.codecademy.com.

For Loops in PHP Forum

View Course » View Exercise

448 points
50fddf16bce4d9cdab00169f_341896797
Submitted by
MysticCupcake
about 4 years ago

Didn't echo 'i'm'?

<?php
$yardlines = array("The 50... ", "the 40... ",
"the 30... ", "the 20... ", "the 10... ");
// Write your foreach loop below this line
foreach($yardlines as $lines){
echo $lines;
}

    // Write your foreach loop above this line
    echo "touchdown!";
  ?>
</p>

It looks like you didn't echo 'I'm', try again. HUH?


0 votes

permalink

foreach ($yardlines as $yards){
echo $yards;
}

1194 points
5579428776b8fec7ef000509_908954593
Submitted by
JanLardz
about 4 years ago

1 Comment

51306991d089e483a100728b_480979936 Omar Zaffar Khan almost 4 years ago

Thanks a lot.


0 votes

permalink

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

    foreach($yardlines as $lines) {
        echo $lines;

    }

     echo "touchdown!";

  ?>

274 points
2284c57882b95e7e889572d6215ec75f?s=140&d=retro
Submitted by
PalMWng
about 4 years ago

1 Comment

51306991d089e483a100728b_480979936 Omar Zaffar Khan almost 4 years ago

Thanks a lot.


0 votes

permalink

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

327 points
5180558ebe4111b8a0000065_821146554
Submitted by
Ankit Gujjar
about 4 years ago


0 votes

permalink

foreach ($yardlines as $words){
echo $words }

Try this . Go back and look exercise 6/7.

664 points
D7055e19db43e9c30774fa4ca3ee7d47?s=140&d=retro
Submitted by
fhudson
about 4 years ago