***************************/ $_SESSION['messageInsertPersonnage'] = true; } } } //Liste des joueurs $joueurGetAll = $JoueurManager->getAll(); $listeJoueur = array(); if (count($joueurGetAll) > 0) { foreach ($joueurGetAll as $joueur) { // Instance de chaque joueur $listeJoueur[] = new Joueur($joueur); } } //Liste des personnages type $personnageTypeGetAll = $PersonnageTypeManager->getAll(); $listePersonnageType = array(); if (count($personnageTypeGetAll) > 0) { foreach ($personnageTypeGetAll as $personnageType) { // Instance de chaque personnage type $listePersonnageType[] = new PersonnageType($personnageType); } } // Contruction d'une variable selectJoueurs au format d'un optiongroup $selectJoueurs = array(); if (count($joueurGetAll) > 0) { foreach ($joueurGetAll as $key => $item) { if (!isset($selectJoueurs[$item['roleNom']])) { $selectJoueurs[$item['roleNom']] = array(); } array_push($selectJoueurs[$item['roleNom']], new Joueur($item));