PHP - else


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

        $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//        



you misspelled discount .

string should be exact match.


Thank you rcodeman.

silly mistake.


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