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 Build a Simple PHP Application Integrating with PayPal Array Keys

Cannot get past code challenge

Here is the error:


Bummer! I see all the book titles and the ISBNs in the browser, but the formatting is not quite right. Each list item should look like this: Book Title (978-0123456789)


Here is my code:


    <?php foreach($books as $isbn => $book) { ?>
       <li> <?php echo $book . " (" . $isbn . ") " ; ?> </li>
    <?php } ?>

Here is the output


Gilgamesh (978-0743261690)
The Odyssey (978-0060931957)
Aesop's Fables (978-0192840509)
Mahabharta (978-0520227040)
Beowulf (978-0393320978)

(Sorry my keyword doesn't have "backticks"

2 Answers

It could be tripping an error because of your second 'space' concatenation after the parenthesis.

Thanks, it worked!