This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Jordan Andrews
almost 11 years

Practicing with ForEach Issue

<?php
  $sentence = array("I'm ", "learning ", "PHP!");
        
  foreach ($sentence as $word) {
    echo $word;
  }
?>

When I try to submit this code, It gives me this error:

Oops, try again! It looks like nothing was echoed!

What should I do?

Answer 515f34455545f0ab05002022

1 vote

Permalink

Never mind. Apparently it worked now.

points
Submitted by Jordan Andrews
almost 11 years

1 comments

Julijana Seketa almost 11 years

sometimes that happends on codecademy

Answer 51a3012a02318198f1001dc0

1 vote

Permalink

You see!!! it is “ foreach” <?php $sentence = array(“I’m “, “learning “, “PHP!”);

    foreach($sentence as $word){
      echo $word;
    }
  ?>
points
Submitted by Montoo Mc
almost 11 years

1 comments

Raahul Jaykar over 10 years

Answer 5161d0204c59c6ddda000acc

0 votes

Permalink

I have the same problem.

points
Submitted by yagtec
almost 11 years

Answer 52ebbd7980ff3340cf000354

0 votes

Permalink

ya it works

points
Submitted by anonymous
about 10 years