Skip to content

Instantly share code, notes, and snippets.

@joshtronic
Created March 30, 2012 14:30
Show Gist options
  • Save joshtronic/2251924 to your computer and use it in GitHub Desktop.
Save joshtronic/2251924 to your computer and use it in GitHub Desktop.
<?php
function sortMarketDeals($a, $b)
{
$a = $a['started_at'];
$b = $b['started_at'];
if ($a == $b)
{
return 0;
}
return ($a < $b) ? -1 : 1;
}
function sortKPI($a, $b)
{
$a = $a['gross_billings'];
$b = $b['gross_billings'];
if ($a == $b)
{
return 0;
}
return ($a > $b) ? -1 : 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment