protected function _sortByStockID($a, $b) { if ($a['stock_id'] == $b['stock_id']) { return 0; } return $a['stock_id'] > $b['stock_id'] ? 1 : -1; }