$code = $json["current"]["weather_code"];
$isDay = ($json["current"]["is_day"]) ? "day" : "night";
$description = $jsonDescriptions[$code][$isDay]["description"];
- echo $description."<br>"."0°";
+ $image = $jsonDescriptions[$code][$isDay]["image"];
+ echo "<img src=\"".$image."\"/><br>".$description."<br>"."0°";
?>
</h1>
<h3>Your 7 day forecast for Park Ridge is:</h3>
for ($i = 0; $i < 7; $i++) {
$code = $json["daily"]["weather_code"][$i];
$description = $jsonDescriptions[$code]["day"]["description"];
+ $image = $jsonDescriptions[$code]["day"]["image"];
$tempHigh = $json["daily"]["temperature_2m_max"][$i];
$tempHighConverted = $tempHigh - $tempNow;
$tempLow = $json["daily"]["temperature_2m_min"][$i];
$tempLowConverted = $tempLow - $tempNow;
echo "<div style=\"min-width: 10%; display: inline-block;\">";
echo "<h3>";
- echo "".date('l', strtotime($json["daily"]["time"][$i]));
+ echo "".date('l', strtotime($json["daily"]["time"][$i]))."<br><img src=\"".$image."\"/>";
echo "</h3>";
echo "<span style=\"font-weight: bold;\">".$description."</span><br>";
echo "<span style=\"font-weight: bold;\">High: </span>".$tempHighConverted."°";