PHP - else


#1

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

My php code is giving me the correct output but when I save and continue it tells me its not.
Please assist if I have missed something.
Thank you


<html>
  <head>
  </head>
  <body>
    <p>
      <?php
        $items = 3;
        
        if($items > 5) {
        echo "You get a 10% discount!";
        }
        
        else {
         echo "You get a 5% disount!"; 
        }
//it is telling me that the outcome  is not printing 5% discount but in the small window on the side it does display this//        

      ?>
    </p>
  </body>
</html>


#2

you misspelled discount .

string should be exact match.


#3

Thank you rcodeman.

silly mistake.


#4

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