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 trialKenneth Jones
6,656 PointsAccounting for empty results challenge
Hello,
I am struggling with this challenge, I keep getting Bummer! Try Again! I have read that this means my php is invalid, however I have pasted my code into my text editor and it seems ok. Any suggestions would be appreciated.
Here is my code:
<?php
if (!empty($recommendations) {
echo '<ul>';
foreach ($recommendations as $flavor) {
echo '<li>' . $flavor . '</li>';
}
echo '</ul>';
}
?>
1 Answer
Kenneth Jones
6,656 PointsI started to see if I could build it up from the basics, I removed all of my code, leaving just the h1 tag, clicked check work and it told me I was successful!