Skip to content

Instantly share code, notes, and snippets.

@szbl
Created September 6, 2017 22:28
Show Gist options
  • Save szbl/04d50dcb443504c9967b7b8e622f09c9 to your computer and use it in GitHub Desktop.
Save szbl/04d50dcb443504c9967b7b8e622f09c9 to your computer and use it in GitHub Desktop.
<?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