Created
September 6, 2017 22:28
-
-
Save szbl/04d50dcb443504c9967b7b8e622f09c9 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
function subval_sort( $a, $b ) | |
{ | |
if ( $a['date'] == $b['date'] ) | |
return 0; | |
return $a['date'] < $b['date'] ? -1 : 1 | |
} | |
usort( $post_data, 'subval_sort' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment