<?php $records = [ [ "Id" => 151601, "First_name" => "John", "Positions" => [ "North" => [ "Current_Level" => 4, "Last_Date" => "11/7/2001", "Time" => "4:15 AM" ], "East" => [ "Current_Level" => 4, "Last_Date" => "7/10/2003", "Time" => "7:30 PM" ], "South" => [ "Current_Level" => 2, "Last_Date" => "8/10/2007", "Time" => "NA" ], "West" => [ "Current_Par_Level" => "NA", "Last_Date" => "NA", "Time" => "NA" ], ] ] ]; foreach ($records as $keyRecord => $record) { foreach ($record as $key => $value) { if (is_array($value)) { foreach ($value as $keyPosition => $position) { if ($position["Time"] == "NA") { unset($records[$keyRecord][$key][$keyPosition]); } } } } } print_r($records);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`