If statements


#1

https://www.codecademy.com/courses/web-beginner-en-QF3Wb/0/2?curriculum_id=5124ef4c78d510dd89003eb8#

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

<html>
  <head>
  </head>
  <body>
    <p>
      <?php
        $items = 2 < 5;
        
        if($items < 5) {
          echo "You get a 10% discount!";
        }
      ?>
    </p>
  </body>
</html>

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


#2

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!


#3

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