- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$month = date('m');
echo "Mois en cours : $month";
echo "\nMois suivant : ".date('m/Y', strtotime('now + 1 month'));
if($month > 1 && $month != 12){
$month--;
}
// echo "\nMois : $month";
for($i = $month; $i <= 12; $i++){
$month = $i;
if(strlen($i) == 1){
$month = '0'.$month;
}
$date = $month.'/'.date('Y');
$des = "Production Gocad du réseau intel du $date";
echo "\n\n$des";
}