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

  • 2
  • Question
  • Updated 8 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 :

$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


  • 4 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 2

Be the first to post a reply!