1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<table><tr><th>Titre1</th><th>Titre2</th></tr><?php
$nb = mysql_numrows($selectRubrique); // on recupère le nombre d'enregistrements
$i = 0;
while ($i < $nb){ // parcours des résultats de la requête
$NomSection = mysql_result($selectRubrique, $i, "nomSection");
?><tr><td><?php echo $NomSection;?></td></tr><?php
While ($NomSection == mysql_result($selectRubrique, $i, "nomSection")
{
$Rubrique = mysql_result($selectRubrique, $i, "nomRubrique")
?><tr><td></td><td><?php echo $Rubrique;?></td></tr><?php
$i++;
}
$i++; |
Partager