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 50 51 52 53
|
<table border="0">
<tr>
<?php
// Stf - compteur de cellules
$cptCell = 0;
// Stf $img_endRow = 0;
$img_columns = 3; // number of columns
// Stf $img_hloopRow1 = 0; // first row flag
// Stf - Sinon, $row_detail n'est pas initialisé au premier passage, or tu l'utilises dans ta boucle
while ($row_detail = mysql_fetch_assoc($detail))
{
// Stf - Faut-il changer de ligne ?
if ((++$cptCell)%$img_columns == 0)
echo "\t</tr>\n\t<tr>";
// Stf - Ecris un second tr au premier passage
// Stf if (($img_endRow == 0) && ($img_hloopRow1++ != 0))
// Stf echo "\t<tr>\n";
// Stf - Si le tableau inclus dans la cellule n'a qu'une seule cellule, il n'a pas d'utilité...
?>
<td><table border="0">
<tr>
<td><?php echo $row_detail['valeurs']; ?></td>
</tr>
</table></td>
<?php
// Stf $img_endRow++;
// Stf if ($img_endRow >= $img_columns)
// Stf {
// Stf ?>
// Stf </tr>
// Stf <?php
// Stf $img_endRow = 0;
// Stf }
}
// Stf - On complète par des cellules vides
for ($i = $cptCell; $i < $img_columns; $i++)
echo "\t\t<td> </td>\n";
// Stf if($img_endRow != 0)
// Stf {
// Stf while ($img_endRow < $img_columns)
// Stf {
// Stf echo("<td> </td>");
// Stf $img_endRow++;
// Stf }
// Stf echo("</tr>");
// Stf }
?>
</tr>
</table> |
Partager