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

Conditionals and Control Flow Forum

View Course » View Exercise

1228 points
506abd81d3d908000203bdc8_409128314
Submitted by
Vikrant Negi
about 4 years ago

Error: Oops, try again! It looks like you didn't print anything!?

Here is my code and give the error "Oops, try again! It looks like you didn't print anything!?". Any help.

  <?php
    $items = 5   // Set this to a number greater than 5!
    if($items > 5){
      echo "You get a 10% discount!";
    }
    else {
        echo "You get a 5% discount!";
    }
  ?>
</p>

1 vote

permalink

You have to set $items to a number greater than 5. Yours is set to 5, so the if test evaluates to false.

1876 points
39db450b4008ea8b66758d155b05ee38?s=140&d=retro
Submitted by
uncola
about 4 years ago

1 Comment

506abd81d3d908000203bdc8_409128314 Vikrant Negi about 4 years ago

I got it, i forgot to add a semicolon after the $items=5;