<?php function getMonthLibelleByDates($filtre) { $format1 = []; $format2 = []; $date = new DateTime(); for ($i = 1; $i <= 12; $i++) { $format1[] = $date->format("M-Y"); $format2[] = $date->format("Y-m-d"); $date->modify("-1 month"); } return array( 'format1'=> $format1, 'format2' => $format2 ); } var_dump(getMonthLibelleByDates(""));
You have javascript disabled. You will not be able to edit any code.