Personal I have following code:
<?php
$key = "*****************";
$forcast_days='5';
$city = '-30.1087957,-51.3169879';
$url ="http://api.apixu.com/v1/forecast.json?key=$key&q=$city&days=$forcast_days&=";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$json_output=curl_exec($ch);
$weather = json_decode($json_output);
$days = $weather->forecast->forecastday;
echo "Cidade: ". $weather->location->name;
echo "<br>";
echo "Estado: ".$weather->location->region;
echo "<br>";
echo "Pais: ".$weather->location->country;
foreach ($days as $day){
echo "<table>";
echo "<tr><td colspan='4' border='0'><h2>{$day->date}</h2>";
echo "<tr><td><h4>Wind</h4></td><td colspan='3'>{$day->day->maxwind_mph}Mph <br> {$day->day->maxwind_kph}kph </td></tr>";
foreach ($day->hour as $hr){
echo "<tr><td colspan='4' border='0'>";
echo "<table style='width:100%;'>";
echo "<tr><td>Time</td><td>Temprature</td><td>Wind</td><td>Humidity</td></tr>";
echo "<tr><td><div>{$hr->time}<img src=' {$hr->condition->icon}'/></div></td><td>{$hr->temp_c}°C<br>{$hr->temp_f}°F</td><td>{$hr->wind_mph}Mph <br> {$hr->wind_kph}kph</td><td>$hr->humidity</td></tr>";
echo "</table></tr></td>";
}
echo "</table> <br>";
Here is the result on the web: link
How can I select variables, for example, from 00:00 to 06:00 only?