<?php
$x = [array (
'timestamp' => 1505324820,
'dateTimeISO' => '2017-09-13T13:47:00-04:00',
'tempF' => 71,
'dewpointF' => 63,
'humidity' => 76,
'pressureMB' => 1012,
'altimeterMB' => 1013,
'windMPH' => 10,
'windSpeedMPH' => 10,
'windDirDEG' => 240,
'windGustMPH' => NULL,
'visibilityMI' => 10,
'weather' => 'Cloudy',
'weatherShort' => 'Cloudy',
'weatherCoded' => '::OV',
'weatherPrimary' => 'Cloudy',
'weatherPrimaryCoded' => '::OV',
'cloudsCoded' => 'OV',
'heatindexF' => 71,
'windchillF' => 71,
'feelslikeF' => 71,
'sunriseISO' => '2017-09-13T06:42:20-04:00',
'sunsetISO' => '2017-09-13T19:14:27-04:00',
'snowDepthIN' => NULL,
'precipIN' => 0,
'sky' => 100,
),
array (
'timestamp' => 1505325240,
'dateTimeISO' => '2017-09-13T13:54:00-04:00',
'tempF' => 71,
'dewpointF' => 63,
'humidity' => 76,
'pressureMB' => 1012,
'altimeterMB' => 1013,
'windMPH' => 10,
'windSpeedMPH' => 10,
'windDirDEG' => 250,
'windGustMPH' => NULL,
'visibilityMI' => 10,
'weather' => 'Cloudy',
'weatherShort' => 'Cloudy',
'weatherCoded' => '::OV',
'weatherPrimary' => 'Cloudy',
'weatherPrimaryCoded' => '::OV',
'cloudsCoded' => 'OV',
'heatindexF' => 71,
'windchillF' => 71,
'feelslikeF' => 71,
'sunriseISO' => '2017-09-13T06:42:20-04:00',
'sunsetISO' => '2017-09-13T19:14:27-04:00',
'snowDepthIN' => NULL,
'precipIN' => 0,
'tempMax6hrF' => 75,
'tempMin6hrF' => 57,
'sky' => 100,
),];
$x = array_filter($x, function ($array) {
return array_key_exists('tempMax6hrF', $array);
});
var_dump($x);
preferences:
65.72 ms | 402 KiB | 5 Q