$type){ $type['slug'] = $slug; $type['unread'] = isset($unreads['detailled'][$slug]) ? $unreads['detailled'][$slug] : 0; if(!isset($type['category'])) $type['category'] = 'Général'; if(!isset($categories[slugify($type['category'])])) $categories[slugify($type['category'])] = array( 'label' => $type['category'], 'items' => array() ); $categories[slugify($type['category'])]['items'][] = $type; } ?>