This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Conditionals and Control Flow Forum

View Course » View Exercise

416 points
5193a09845f5b72746000147_897148442
Submitted by
EmPemm_4f08463b01f2090003017b59_dele
over 4 years ago

Oops, try again! It looks like you didn't print anything

I am getting the message "oops, try again! It looks like you didn't print anything" when in fact "You get a 10% discount!" is returned

This is my code:

<?php
$items = 6; // Set this to a number greater than 5!
if ($items > 5) {
print "You get a 10% discount!";
} else {
print "You get a 5% discount!";
} ?>

I have tried using echo as well as print but each time I get the error message even though the text has been returned. I have tried on Firefox and Chrome but have the same issue on both browsers.

What am I missing???????????????????


2 votes

permalink

After countless attempts this finally passed, I guess it was something to do with the issues with the php lessons on this site

416 points
5193a09845f5b72746000147_897148442
Submitted by
EmPemm_4f08463b01f2090003017b59_dele
over 4 years ago


0 votes

permalink

I have this problem, too

356 points
Picture
Submitted by
Mihail Pareev
about 4 years ago

1 Comment

Picture Yilson Jimenez about 4 years ago

yo tengo ese problema que hago? como resuelvo pasar de ahi


0 votes

permalink

same here, what did you do to fix it?

148 points
97793671e82bd00bf6a1c46fc3ec2602?s=140&d=retro
Submitted by
Xanatos340
over 3 years ago


0 votes

permalink

I don't get this either...anyone have a solution?

284 points
56a5dfb63b55ea302f0001aa_146114136
Submitted by
Sid
almost 3 years ago