3. Adding an ELSE - False ERROR!



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

        $items = 3;
        if($items > 5) {
          echo "You get a 10% discount!";
         else {
            echo "Youe get a 5% discount!";  


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


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


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


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