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

For Loops in PHP Forum

View Course » View Exercise

1032 points
418463ea876fbbaf0bc849c3b79360a3?s=140&d=retro
Submitted by
gavin barker
almost 4 years ago

Code seems ok but not working

what is wrong with this?

  <?php
    $sentence = array("I'm ", "learning ", "PHP!");

    foreach($sentence as $word);{
      echo $word;
    }
  ?>

1 vote

permalink

foreach($sentence as $word);{ // delete ";"

409 points
550f0c4595e378eb1f003df2_295498907
Submitted by
Julia
almost 4 years ago

1 Comment

418463ea876fbbaf0bc849c3b79360a3?s=140&d=retro gavin barker almost 4 years ago

thanks!