Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!empty($args['top-first'])):
- uasort($formatted, array($this, 'compare'));
- else:
- ksort($formatted);
- endif;
- return array('agents' => $formatted, 'dates' => $dates, 'totals' => $totals, 'colors' => $colors);
- }
- function compare($a, $b){
- if ($a['sales'] == $b['sales']) {
- return 0;
- }
- return ($a['sales'] > $b['sales']) ? -1 : 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment