3. Adding an ELSE - False ERROR!


#1


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


I get an error but the condition in the error message is not true. At a loss.


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


#4

You are right, No excuse. I apologize for the comment. Must be watching too much DT lately; don't know my own mind.


#5

I have this same issue, how do I get around this error?


#6

Be sure that you set $item to a number greater than 5.


#7

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