PHP Order Array Trait: Sort arrays of indexed strings with custom sorting

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-05-07 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 135 All time: 9,024 This week: 247Up
Version License PHP version Categories
ordertrait 1.0.0The PHP License5.3.0PHP 5, Data types, Traits
Description Author

This package can be used to sort arrays of indexed strings with custom sorting.

It provides a trait that can be used directly to sort arrays with members that are associative arrays.

The trait takes a string parameter that defines the name of the array key that will be used to sort the elements.

It returns an array sorted based on character order. The sorting order can be changed using a string that defines the order of the characters in the sorting key element.

Innovation Award
PHP Programming Innovation award winner
May 2020
Winner


Prize: One official elePHPant Plush Mascott
Many applications need to sort information according to criteria. Often that information is stored in associative arrays.

This package provides a trait that can be used to sort any associative array.

It uses a given string for defining the sorting criteria of string values of a given key of the associative array to be sorted.

Manuel Lemos
Picture of Raphael Paez
  Performance   Level  
Name: Raphael Paez <contact>
Classes: 3 packages by
Country: Brazil Brazil
Age: ???
All time rank: 3032225 in Brazil Brazil
Week rank: 42 Up2 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file index.php Example Example
Plain text file OrderTrait.php Class Function orderArrayPerson(arrayOrder, attributeNameOrder)

 Version Control Unique User Downloads Download Rankings  
 0%
Total:135
This week:0
All time:9,024
This week:247Up

For more information send a message to info at phpclasses dot org.