If statements



Oops, try again. Make sure to edit the condition line 9 so that it is true.

        $items = 2 < 5;
        if($items < 5) {
          echo "You get a 10% discount!";

my computer dosent like me at all ugghhh:sob::sob::scream:


set $items equal to a number greater than 5.
you have to assign a number that is greater than 5.
but you didn't do that.

here $items = 2 < 5; means $items = true;  // so you added Boolean value. here it's wrong

add any number that is greater than 5;

now here
if($items < 5)

edit the condition so that your program will print out You get a 10% discount!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.