<?php
$monate = array( 1=>"Januar", 2=>"Februar", 3=>"März", 4=>"April", 5=>"Mai",
6=>"Juni", 7=>"Juli", 8=>"August", 9=>"September", 10=>"Oktober", 11=>"November",
12=>"Dezember");
//aktueller monat
$d = new DateTime('today');
$d->modify('first day of this month');
$lowmonth = $d->format('Y-m-d');
$highmonth = $d->format('ym');
$hm = (int) $highmonth;
$monat = date("n");
$pre = "<li><a href='monthly/";
$mid = ".php'>";
$end = "</a></li>";
$lm = 6;
$ly = 13;
$thim = $lm;
$thiy = $ly;
$ye = 0;
$dast = $ly.$lm;
$dat = (int) $dast;
while ($dat < $hm){
if ($thim == 12){
$ye = 1;
$thiy++;}
else {
$ye = 0;}
if ($ye = 1){
$thim = 1;}
else {
$thim++;}
echo $pre.$thiy."-".$thim.$mid.$monate[$thim]." 20".$thiy.$end;
$dats = $thiy.$thim;
$dat = (int) $dats;}
?>
preferences:
47.28 ms | 402 KiB | 5 Q