How to display day icons when is day and night icons when is night automatically (with php) ?

  • 2
  • Question
  • Updated 6 years ago
Do anyone knows what i have to change in my php code in order to show the night icons too when is night ?

My code :

{'location'}->{'city'};
$icon = $parsed_json->{'current_observation'}->{'icon'};
$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};
echo " Weather now : ${temp_c} C \n";

?>

..but is showing only the day-icons :(

I want when is day to show the day icons and when is night to show the night icons ?
Photo of Weatherps

Weatherps

  • 4 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 2

Be the first to post a reply!