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 Enhancing a Simple PHP Application Paginating a List: Controller Adjusting Invalid Numbers

Jerry Earls
PLUS
Jerry Earls
Courses Plus Student 5,598 Points

I do not understand what is being asked of me in this challange

There is no command in the foreach loop and I am not sure what I am being asked to do here.

1 Answer

Erik McClintock
Erik McClintock
45,783 Points

Jerry,

This challenge is asking you to write conditional checks inside the foreach loop to determine which categories the current number fits into. As it stands, the $number is simply being put into each category, even though it might not meet the requirements for each.

You could use some if statements to check the value of the current number against the requirements for each category, for example.

Hope this helps point you in the proper direction!

Erik