It looks like your code didn't print 'You get a 5% discount!'


#1


Adding an else


Oops, try again. Did you accidentally change the condition in your if statement? It looks like your code didn't print 'You get a 5% discount!'

except it does? i don't see where i've messed up.


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


#2

It needs to be

        else {
            print "You get a 5% discount!";
        }

You typed in echo "message"
when its suppose to be print "message"
I also got confused at this part.


#3

i tried that but it still says the same thing!


#4

Experiencing the same problem here.Please help.


#5

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