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 trialMartijn Hoekstra
819 PointsBug or wrong code
I'm having alot of trouble getting through these tasks, it keeps saying "Oops! It looks like Task 1 is no longer passing.". I'm using the following foreach loop:
<?php foreach($books as $isbn => $book) { ?>
<li><?php echo "(" . $isbn . ")"; ?></li>
<?php } ?>
1 Answer
Andrew McCormick
17,730 PointsIt's because you are no longer displaying the title.
In Step one it had ?php echo $book; ?>
. Which just echoed the title. Here you have erased $book (which means that that task 1 no longer works) and only display the ISBN. Make sure you have the title followed by a space and then the ISBN in parenthesis.
Martijn Hoekstra
819 PointsMartijn Hoekstra
819 PointsThank you very much for your help, I completely overlooked the "AFTER the title..." :)