Can't fix it although I have read all the solutions but still can't fixed it.Thanks


#1

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


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!'


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


#2

well the main thing to look at is the print error it says you forgot to print not echo





<?php
$items = 10;

    if($items > 5) {
      echo "You get a 10% discount!";
    }
    else {
        print "You get a 5% discount!";
         }
  ?>
</p>



#3

Thanks, I have that noted.


#4

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