So I´ve got this array, containing the german equivilant word for each month number (without leading zero):
$months= 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");
Now I´m fetching the month 3 days ago:
$german = date("n", strtotime("-3 days"));
Echoing the value of $german in $months produces an error:
echo $month($german);
Error Message:
Fatal error: Function name must be a string in X on line X
Echoing $german alone doesn´t produce an error.
Echoing $months(date("n", strtotime("some $row value from database"))) doesn´t produce an error.
What´s the problem?
I already tried doing this: echo $months((int)$german), but this didn´t work either.