3. Adding an Else



All it says is:
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN on line 19
I've seen other topics and none of them helped.

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


Hi sw0rddance,

Your code is working fine...and there's no line 19 here ....are you still getting the error??


Yep. It's really stupid...:rage:


Could you provide a screenshot of your code window along with the error?



It's working here at my end.....try refreshing the browser and try again


Well, I've been working on this one for days...so of course I've already refreshed it.


Fixed it. Thanks for your help anyway, @abhi.borkakoty


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