1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <?
//Définition des date au format jour-mois-année
$date_today = date("d-m-Y");
$f = date ( "d-m-Y" , mktime ( 0 , 0 , 0 , 12 , 31 , date("Y") ) ) ;
//Extraction des données
list($jour1, $mois1, $annee1) = explode('-', $f);
list($jour2, $mois2, $annee2) = explode('-', $date_today);
//Calcul des timestamp
$timestamp1 = mktime(0,0,0,$mois1,$jour1,$annee1);
$timestamp2 = mktime(0,0,0,$mois2,$jour2,$annee2);
$a = number_format(abs($timestamp2 - $timestamp1)/(86400*7*4));?>
<table width="90%" border=1 align="center" cellpadding=7 cellspacing=0 bordercolor="#AODOFF" bgcolor="white">
<tr>
<?
for($i=1;$i<$a;$i++)
{
?>
<th align="left"> <? echo date ( 'd-m-Y' , mktime ( 0 , 0 , 0 , (date('m')+$i) , 1 , date('Y') ) ) ;?></th>
<?
}
?>
</tr>
</table> |
Partager