Bitteschön, wer will kann es probieren, dazu das Konstrukt switch / case durch die folgenden Zeilen ersetzen:
Code: Alles auswählen
$Monatstabelle = array
(
// 0:00 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00
// Index 0 Januar
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 1 Februar
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 2 Maerz
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 3 April
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 4 Mai
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 5 Juni
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 6 Juli
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 7 August
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 8 September
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 9 Oktober
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 10 November
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0),
// Index 11 Dezember
array
( 0, 0, 0, 0, 0, 1.5, 1.35, 0.95, 1.25, 0.90, 0.62, 0.62, 0.70, 0.70, 0.75, 1.18, 1.6, 1.5, 2.3, 1.8, 0, 0, 0, 0)
);
$STDFAKT = $Monatstabelle[date("m")-1][$TH];
Natürlich müsst Ihr Eure Werte einsetzen, aber ich habe es extra in eine Zeile gepackt, so kann man Januar editieren und dann erst mal die Zeile kopieren und dann bei allen Monaten ersetzen...