$isDay = ($json["current"]["is_day"]) ? "day" : "night";
$description = $jsonDescriptions[$code][$isDay]["description"];
$image = $jsonDescriptions[$code][$isDay]["image"];
- echo "<img src=\"".$image."\"/><br>".$description."<br>".$json["current"]["temperature_2m"]."° F\n";
+ echo "<img src=\"".$image."\"/><br>".$description."<br>".floor($json["current"]["temperature_2m"])."° F\n";
echo "</h1>\n";
echo "<h3>Your 7 day forecast for Park Ridge is:</h3>\n";
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];
- $tempLow = $json["daily"]["temperature_2m_min"][$i];
+ $tempHigh = floor($json["daily"]["temperature_2m_max"][$i]);
+ $tempLow = floor($json["daily"]["temperature_2m_min"][$i]);
echo "<div style=\"min-width: 10%; display: inline-block;\">\n";
echo "<h3>\n";
echo "".date('l', strtotime($json["daily"]["time"][$i]))."<br><img src=\"".$image."\"/>\n";