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 PHP Arrays and Control Structures PHP Loops Sorting Multidimensional Arrays

Siraj Khan
Siraj Khan
3,451 Points

Can anyone please explain this entire lesson in simple words.? Everything is going over my head. I can't catch Alena.

Can anyone please explain this entire lesson in simple words.? Everything is going over my head. I can't catch Alena. Specifically the logic behind adding 12 at the end of the lesson.

I really need to understand what does Alena Holligan is trying to convey/teach.?

she is looping through the array and ordering the items by date, if the item does not have a date it is ordered by priority. She doesnt want the items with blank dates listed before the items with dates so she sets the priority ordered items to +12 because that will ensure they are always listed after the dates(12 months in a year so the blank items priority interger + 12 will always come after a date restricted to just 12 months)

2 Answers

Jeremy Antoine
Jeremy Antoine
15,785 Points

This entire lesson is very complex. For people new to PHP I suggest watching through each video entirely first, then go back and follow along. It really helped me in the beginning.

nathan goel
nathan goel
7,410 Points

I have watched from the beginning and it was ok until that lesson, It's becoming so complex that you don't really understand much.

Daniel Bettech
Daniel Bettech
7,365 Points

This lesson is very confusing