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

Hugh ONeill
PLUS
Hugh ONeill
Courses Plus Student 2,248 Points

PHP questions, How can a Developer make the html form sort by clicking on form? I just learned about sort functions.

I just learned about PHP Arrays and Control Structures and really excited about being introduced to this logic.

How can a Developer make the html form sort by clicking on form? Can this be driven by PHP or do I need to focus on another technology like Javascript?

I want to learn how to best approach an active form or intelligent form?

1 Answer

Robert Gouveia
PLUS
Robert Gouveia
Courses Plus Student 1,714 Points

It can but to be honest it is easier and less hassle to do this via jquery on the front end, simply run all and then sort it using jquery.

It loads quicker and is a lot less hassle than having to sort(), asort(), arsort(), ksort() and the list goes on.