1, 'done' => 2, 'cancelled' => 3]; $type_priority = ['bug' => 1, 'improvement' => 2, 'nice-to-have' => 3]; // Compare by status first if ($status_priority[$a['status']] != $status_priority[$b['status']]) { return $status_priority[$a['status']] - $status_priority[$b['status']]; } // Status is the same, compare by type next return $type_priority[$a['type']] - $type_priority[$b['type']]; }); foreach ($backlog as $item): ?>
T Title Description Status Created Actions
'bi-bug-fill text-danger', 'improvement' => 'bi-tools text-success', 'nice-to-have' => 'bi-star text-secondary' ][$type] ?? ''; ?> 'warning', 'done' => 'success', 'cancelled' => 'secondary' ][$status] ?? 'light'; ?>