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

0 points
Submitted by hali
over 10 years

How is this not correct?

How is this not correct?!!!

<?php
     $items= 6;
    if ($items > 5); {
    echo "You get a 10% discount";
 }
?>

Alex J edited this post to fix code formatting

Answer 51d7ef2a8c1ccc22a6026dfb

3 votes

Permalink

Remove the semicolon ; after the if ($items > 5)

points
Submitted by Alex J
over 10 years

Answer 51d83279631fe9dee702d30c

1 vote

Permalink

remove semicolon after if

points
Submitted by Vivek Gaikwad
over 10 years

Answer 51d860cb7c82ca1bcd02e100

0 votes

Permalink

yes it worked, thank u!

points
Submitted by hali
over 10 years

Answer 52163a4a80ff333f54003f61

0 votes

Permalink

I have discovered that you actually have to delete the – symbols to pass!!!

points
Submitted by Nigel Sharples
over 10 years