Fusionner cases si identiques tableau HTML
Bonjour,
Mon problème est assez complexe j'imagine...
Je souhaite fusionner des cases juxtaposées si seulement leurs contenus sont identiques.
J'imagine que ce projet sera réalisé à l'aide d'un script, cependant je ne vois pas du tout par où commencer...
Voici mon code : (HTML + PHP)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <html>
<meta charset="utf-8" />
<a style="color:white;padding:5px;">Emploi Du Temps</a>
<table id="edt">
<tr>
<th></th>
<th>Lundi</th>
<th>Mardi</th>
<th>Mercredi</th>
<th>Jeudi</th>
<th>Vendredi</th>
<th>Samedi</th>
<th>Dimanche</th>
</tr>
<?php
try
{
// On se connecte à MySQL
$bdd = new PDO('mysql:host=*****;dbname=*****;charset=utf8', '*****', '*****');
}
catch(Exception $e)
{
// En cas d'erreur, on affiche un message et on arrête tout
die('Erreur : '.$e->getMessage());
}
$reponse = $bdd->query('SELECT * FROM edt');
while ($donnees = $reponse->fetch())
{
?>
<tr>
<th><?php echo $donnees['horaire']; ?></th>
<td><?php echo $donnees['lundi']; ?></td>
<td><?php echo $donnees['mardi']; ?></td>
<td><?php echo $donnees['mercredi']; ?></td>
<td><?php echo $donnees['jeudi']; ?></td>
<td><?php echo $donnees['vendredi']; ?></td>
<td><?php echo $donnees['samedi']; ?></td>
<td><?php echo $donnees['dimanche']; ?></td>
</tr>
<?php
}
$reponse->closeCursor(); // Termine le traitement de la requête
?>
</table>
</html> |
Merci de votre lecture, si jamais je ne suis pas assez explicite, faites moi signe...