Jump to content

How to order an array with for?


Meg_Griffin
 Share

Recommended Posts

PHP has a sort() method with which you don't need to use a loop. You have to determine by which criteria you want to sort the array. If the array's data was obtained from a database, it would be better to sort it using the SQL query.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...