|
|
|
|
j'ai completement changé ton script ::: voici ma version,,, a toi de voir combien de colonnes tu veux et quelle date commance le compteur! !!
<?php echo '<center><h4>Recherche par Année </br></br></br></h4></center>'; $year = date("Y"); $year_end = 1977; $nb_col = 5; echo '<table width="300px" border="1">'; while ($year > $year_end) { if ($i==$nb_col) { echo "</tr>"; $i=0; } if ($i==0) { echo "<tr>"; } echo "<td>$year</td>"; $i++; $year--; } if ($i>0 && $i<$nb_col) { while ($i<$nb_col) { echo "<td> </td>"; $i++; } echo "</tr>"; } echo '</table>'; ?> Là où la diplomatie a echoué, il reste la femme. |
Voici une autre possiblité assez proche:
<?php
$nbCol = 5;
$startYear = 1997;
$endYear = date('Y');
print("<table>\n");
$year = $startYear;
while ($year <= $endYear) {
$colCount = 0;
print("<tr>");
while ($colCount <= $nbCol) {
if ($year > $endYear) {
print("<td> </td>\n");
} else {
print("<td>".$year."</td>\n");
}
$colCount++;
$year++;
}
print("</tr>\n");
}
print("</table>");
|
Résultats pour sos debutante , affichage d'un tableau
Résultats pour sos debutante , affichage d'un tableau
Résultats pour sos debutante , affichage d'un tableau
Résultats pour sos debutante , affichage d'un tableau