edit: gah, i was looking at another post and posted in the wrong php section....
just making a small switch based on the hour of the day but running into a problem when the time is 00 (24hr clock). it seems to default to the dawn output. even tried to change the code so the night output would be on the top, but it still outputs as dawn when the time is at 0.
$test = 0;
switch ($test) {
case $test >= 6 && $test <= 8:
return "dawn(".$test.")";
break;
case $test >= 9 && $test <= 17:
return "day(".$test.")";
break;
case $test >= 18 && $test <= 20:
return "evening(".$test.")";
break;
case $test >= 21 && $test <= 23 || $test >= 0 && $test <= 5:
return "night(".$test.")";
break;