Skip to content

Instantly share code, notes, and snippets.

@gcoop
Created March 16, 2011 15:57
Show Gist options
  • Save gcoop/872715 to your computer and use it in GitHub Desktop.
Save gcoop/872715 to your computer and use it in GitHub Desktop.
<?php
function _cmpAscA($m, $n) {
if ($m->unixstart == $n->unixstart)
return 0;
return ($m->unixstart < $n->unixstart) ? -1 : 1;
}
function _cmpDescA($m, $n) {
if ($m->unixstart == $n->unixstart)
return 0;
return ($m->unixstart > $n->unixstart) ? -1 : 1;
}
usort($allEvents, array('OBJECT NAME', '_cmpDescA'));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment