Ouais c'est justement le piège.
Maintenant je cherche ça :
<?php
include "entete.php";
if(estAdmin() == false){
echo "<h2>Vous devez vous connecter comme administrateur</h2>";
}
else{
$lesConferences = donnerToutesLesConferences();
$nbConferences = count($lesConferences);
?>
<table>
<?php
for($i = 0; $i < $nbConferences; $i++){
$uneConference = $lesConferences[$i];
$creneau = $uneConference['creneau'];
$description = $uneConference['description'];
$id = $uneConference['id'];
$lesParticipants = donnerParticipants($id);
$nbParticipants = count($lesParticipants);
?>
<th><?php echo $id ?></th><th><?php echo $creneau ?></th> <th><?php echo $description?></th>
<th>Nombre d'inscrits : <?php echo $nbParticipants ?> </th>
<?php
for($j = 0; $j <$nbParticipants; $j++ ){
$unParticipant =$lesParticipants[$j];
$nom = $unParticipant['nom'];
$prenom = $unParticipant['prenom'];
$ville = $unParticipant['ville'];
$profession = $unParticipant['profession'];
$mail = $unParticipant['mail'];
?>
<tr>
<td><?php echo $nom ?></td>
<td><?php echo $prenom ?></td>
<td><?php echo $ville ?></td>
<td><?php echo $profession ?></td>
<td><?php echo $mail ?></td>
</tr>
<?php
}
}
echo '</table>';
}
?>
</body>
</html>
Énumérer tous les numéros de lignes dans le cas où un utilisateur non identifié tente de visualisé ce formulaire.
Une boucle "for" commence à la ligne 22, à quelle ligne se termine-t-elle ?
A la ligne 13, la variable §uneConference est utilisée, indiquer son type, justifier votre réponse.
Dans le cas où la variable de la ligne 16 §id vaut 4, donner la valeur de §nbParticipants à la ligne 21,telle qu'elle est interprétée dans le formulaire reproduit plus haut.
