Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Moutasem Raheem
Moutasem Raheem
2,802 Points

my code is correct but i am getting (Incorrect output)!!

this is my code

<?php $studentOneName = 'Dave'; $studentOneGPA = 3.8;

$studentTwoName = 'Treasure'; $studentTwoGPA = 4.0;

//Place your code below this comment

if ($studentOneGPA == 4.0) { echo "$studentOneName made the Honor Role"; } else { echo "$studentOneName has a GPA of $studentOneGPA"; }

if ($studentTwoGPA == 4.0) {
    echo "$studentTwoName made the Honor Role";
} else {
    echo "$studentTwoName has a GPA of $studentTwoGPA";
}

?>

and i am getting Bummer! Incorrect output!! i don't know why

Can you link to the challenge you're on?

The instructions changed recently and I think it might be "Honor Roll" now instead of "Honor Role"

2 Answers

Try changing "role" to "roll" in all places :)

Good luck! ~Alex

Moutasem Raheem
Moutasem Raheem
2,802 Points

thank you so much it's work

No probs :)

Sean T. Unwin
Sean T. Unwin
28,690 Points

I just ran your code by changing "Role" to "Roll", inside both if statements, and it passed. Jason was setting you on the correct path. Good luck!