I'm using PHP to pass a class into a div based on the current conditions for my city. Echoing $icon gives me "clear" or "cloudy" but it does not include a note for whether it is after sunset or not.
What's the best way to pass through a nighttime or daytime variable through this?
What's the best way to pass through a nighttime or daytime variable through this?
$icon = $parsed_json->{'current_observation'}->{'icon'};
echo "${icon}";