This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Shnikers
almost 10 years

This Has to Be a Bug...

This is probably one of the many exercises that I’ve come across on Codecademy that has a bug. There is nothing wrong with the code… <?php if(4==5) { echo "I hate you!"; } else { echo "Cheese!!!"; } ?> And Codecademy is acting particularly slow today…Maybe that’s it…

Answer 53c549c2282ae3938f005239

4 votes

Permalink

Actually, never mind. I turned out that you had to do an elseif statement too. Updated code is: <?php if(6==6) { echo "I hate you!"; } elseif { echo "Cheese!!!"; } else { echo "Napkin!!!!!!!!!!!"; ?>

points
Submitted by Shnikers
almost 10 years

Answer 53ed04a852f86368e2000067

0 votes

Permalink

And what’s wrong with it -

points
Submitted by sebastian.grodecki
over 9 years

1 comments

Sébastien Nadaus over 9 years

it miss {] at elsif condition