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

0 points
Submitted by Vikrant Negi
about 11 years

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>

Answer 515076b18fcdb06d57000e47

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.

points
Submitted by uncola
about 11 years

1 comments

Vikrant Negi about 11 years

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