Tråd: Elseif - PHP
View Single Post
Hei! Sitter her og prøver meg på litt PHP på Codecademy, men det er ett trinn jeg ikke kommer meg videre på.

Enten står det "Did you include the 'elseif' keyword?" eller "Looks like you didn't print anything"

Kode

<html>
  <head>
    <title>Our Shop</title>
  </head>
  <body>
    <p>
      <?php
        $items =  6;   // Set this to a number greater than 5!
        if ($items > 4) {
          echo "You get a 10% discount!";
          
         } else {
             print "You get a 5% discount!";
         } elseif ($items == 1) {
             print "Sorry, no discount!";
         }
         
             
         
         
        
      ?>
    </p>
  </body>
</html>
Noen som klarer å se hva jeg har gjort feil?