Forum Moderators: coopster
if (date("m-d") >= "12-22" && date("m-d") <= "04-15") { To use >= and <= you need to have scalar values rather than strings for a start, but that doesn't help in this case when you're wrapping around the end of the year. It also discriminates against either the northern- or southern-hemisphere ;)
$day = date('j');
$month = date('n');
switch($month) {
case 1:
case 2:
case 3:
return "high_2";
break;
case 4:
return ($day <= 15)? "high_2" : "low_1";
break;
case 5:
case 6:
return "low_1";
break;
case 7:
...
} ;)