Voila je me suis permis de m'inscrire ici, car j'ai un petit soucis pour gerer un tableau
Je m'explique, j'ai dans ma base SQL une table qui contient les parametres de mes tableaux (colspan, rowspan, couleur du texte, taille du texte, alignement ... et je voudrais que tout soit geré correctemenet :)
Seulement actuellement, l'affichage est correct mais uniquement si on a un rowspan par lignes groupées 
En gros si on commence un autre rowspan avant que celui d'avant ne soit fini, ca plante, je sais pas si je me suis fait bien comprendre 
Je joins qqes SC si ca peut aider, est ce que qqun saurait comment faire pour gerer tout ca correctement ?
les entrees SQL
[URL=http://imageshack.us][IMG]http://img460.imageshack.us/img460/5559/bdd3xx.gif[/IMG][/URL]
et le resultat
[URL=http://imageshack.us][IMG]http://img460.imageshack.us/img460/6749/tableau7pv.gif[/IMG][/URL]
et le code
[PHP]
$nb_columns = $nb_columns[PYNFATYF_nb_columns];
$cmpt=1;
$cmpt_row=1;
$actual_row=1;
echo "<td class=\"alt1\" align=\"center\">
<table border=\"1\" width=\"80%\">
";
while ($table=$db->fetch_array($tables))
{
if ($table[rowspan]!=$actual_row && $table[rowspan]!=1)
$actual_row = $table[rowspan];
if ($cmpt==1)
{
$tr="
<tr>
";
if ($cmpt_row<=$actual_row && $cmpt_row>1)
$cmpt++;
}
else $tr="";
if ($table[colspan] + $cmpt > $nb_columns)
{
$untr="
</tr>
";
$cmpt=1;
if ($actual_row!=1)
$cmpt_row++;
}
else
{
$untr="";
$cmpt++;
}
if ($actual_row <= $cmpt_row && $actual_row!=1 && $cmpt==$nb_columns)
{
$cmpt_row = 1;
$actual_row = 1;
}
if ($table[colspan]>1)
$colspan = "colspan=\"$table[colspan]\"";
else $colspan ="";
if ($table[rowspan]>1)
$colspan = "rowspan=\"$table[rowspan]\"";
else $rowspan ="";
if ($table[color_font]!="" || $table[size_font]!="0" || $table[police_font]!="")
{
if ($table[color_font]!= "")
$color = "color=\"$table[color_font]\"";
else $color = "";
if ($table[size_font]!= "0")
$size = "size=\"$table[size_font]\"";
else $size = "";
if ($table[police_font]!= "")
$police = "face=\"$table[police_font]\"";
else $police = "";
$font = "<font $police $color $size>";
$unfont ="</font>";
}
else {$font="";
$unfont="";}
$align="$table[align]";
echo "$tr <td $colspan $rowspan align=\"$align\">$font $table[name] $unfont</td> $untr";
[/PHP]