Skip to content

devall-eu/Sorting-array-with-multiple-data-in-PHP-by-a-specific-key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sorting-array-with-multiple-data-in-PHP-by-a-specific-key

When you have a array with multiple data types and would like to sort the field by a specific key within the field.

It comes in handy when you retrieve data into an array from a database or populate an array with a PHP loop such as foreach or while, and then want to sort the array by a particular key.

The function has the parameters "array", "key" and "sorting ASC or DESC". Unless the last parameter is specified, ASC sorting is the primary choice.

Visit on page: https://dev-all.eu/blog/sorting-array-with-multiple-data-in-php-by-a-specific-key

About

When you have a array with multiple data types and would like to sort the field by a specific key within the field.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages