PHP Compare Multi-dimensional Array Function

/ Published in: PHP
Save to your folder(s)

For more information, see, under usort

It works with dates

Replace 0 for the array's key you want to sort. For example, if you have a start_date array key you would like to compare, then you would replace 0 for start_date.

If you want to do a reverse sort, just switch the -1 and 1.


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.