Last active
January 4, 2021 17:27
-
-
Save thorbrink/6514393 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usort( $array, function( $a, $b ) { | |
if( $a['key'] === $b['key'] ) { | |
return 0; | |
} | |
return ( $a['key'] < $b['key'] ) ? 1 : -1; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment