Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exercice PHP
<!DOCTYPE html>
<?php
$students = [
[
"id" => 1,
"name" => "Amanda ANDERSSON",
"CC1" => 10,
"CC2" => 17,
"CC3" => 12
],
[
"id" => 2,
"name" => "Christopher HARISSON",
"CC1" => 16,
"CC2" => 8,
"CC3" => 13
],
[
"id" => 3,
"name" => "Whitney VARGO",
"CC1" => 13,
"CC2" => 2,
"CC3" => 6
]
];
// Afficher la liste des étudiants dans un tableau HTML de manière dynamique
// Calculer et afficher la moyenne de chaque étudiant
// Calculer et afficher la moyenne globale de tous les étudiants
?>
<html lang="fr-FR">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Page de gestion des étudiants avec leur notes et moyennes.">
<meta name="theme-color" content="#ffffff">
<title>Étudiants</title>
</head>
<body>
<h1>Étudiants</h1>
<table>
<thead>
<tr>
<th>Identifiant</th>
<th>Nom</th>
<th>CC1</th>
<th>CC2</th>
<th>CC3</th>
<th>Moyenne</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th colspan="5">Moyenne Globale</th>
<td>0</td>
</tr>
</tfoot>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment