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 trialBrian Taylor
3,436 PointsI'm pretty sure my solution is doing what is asked, but isn't being accepted. It's keeping me from moving on..
Do the variables need to be concatenated in some specific way? It would help if we could see the code that is being run as the test so I can see why I'm failing.
The error message is "Use the Variables to output the message", which I am doing.
<?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 Roll \n";
} else {
echo "$studentOneName has a GPA of $studentOneGPA \n";
};
if ($studentTwoGPA == 4.0) {
echo "$studentTwoName made the Honor Roll";
} else {
echo "$studentTwoname has a GPA of $studentTwoGPA \n";
};
?>
2 Answers
Steven Parker
231,269 PointsYou've got it, except for a little typo on the last line where you have "$studentTwoname" (lower case "n") instead of "$studentTwoName" (upper case "N").
Brian Taylor
3,436 PointsThanks!
I caught that but then couldn't find a way to get to my question to update it! I appreciate the look :)
Steven Parker
231,269 PointsDid you try selecting "My Posts" instead of "Newest" in the box next to the Search line?
Brian Taylor
3,436 PointsThe 'get help' flow never directed me to the community area, just from submitting my question back to the challenge.
I'd never submitted a question before so hadn't realized I needed to navigate to the community area to look for it,
Makes sense now though! Thanks.