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

HELPP

The array below contains a list of books. Each element in the array has the book’s title as its value and the ISBN as its key. Right now, the page is only displaying the book titles in the browser. In this code challenge, we will modify the page to also display each book’s ISBN. First, we need to make the keys from the books array accessible inside the foreach loop. Modify the foreach command so that, as it loops through the books, it loads the ISBN for each book into a working variable called $isbn.

4 Answers

What exactly did you need help with?

I don't understand what it is I'm supposed to do....

They are asking you to create a foreach loop (while assigning the value $isbn to a variable).i.e. All you have to do is figure out how to make the assignment for $isbn (it's in the video).

foreach (statement here) { .... }

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

This maybe a help.. Sorry it's only a link