Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.