Bonjour,

voilà j'essaye de faire un système d'échéancier, il faut que je note le mois puis l'année mais j'ai un doublon de mois qui se fait au niveau du basculement de l'année

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
 <html>
 <body>
  <table width="200" border="1" cellspacing="0" cellpadding="0">
  <tr>
   <td>Num&eacute;ro &eacute;ch&eacute;ance</td>
    <td>Date</td>
  </tr>
 
<?php
 $date=date("d-m-Y"); 
list($jour, $mois, $annee) = explode('-', $date);
 
 for($numero_echeance=1; $numero_echeance<=300; ++$numero_echeance)
{	echo"<tr>";
	 echo"<td>";
	echo $numero_echeance;
	echo"</td>";
	if($mois >12)
	{
		$annee++;
		$mois =1;
		echo "<td>".$mois."/".$annee."</td>";
	}
	else
	{
 
		if($mois == 1)
		{
			echo "<td>".$mois."/".$annee."</td>";
			$mois++;
		}
		else
		{
			echo "<td>".$mois."/".$annee."</td>";
			$mois++;
		}
	}
 
}
 
 
?>
</table>
</body>
</html>
Merci du coup de pouce