<?php $array1 = [ (object)["id" => 22,"accessid" => 2, "utype_id" => 11, "discount" => 3434, "published" => 1], (object)["id" => 23,"accessid" => 2, "utype_id" => 14, "discount" => 2, "published" => 1] ]; $array2 = [ (object)["id" => 9, "type_name" => "Admin", "description" => "admin", "published" => 0], (object)["id" => 10, "type_name" => "Senior sales", "description" => "senior sales", "published" => 0], (object)["id" => 11, "type_name" => "junior sales", "description" => "junior sales", "published" => 1], (object)["id" => 14, "type_name" => "dealer", "description" => "dealer", "published" => 0], (object)["id" => 15, "type_name" => "fgdg", "description" => "dfg", "published" => 1], (object)["id" => 16, "type_name" => "fgdfg", "description" => "fgdfg", "published" => 0] ]; $utype_ids = []; foreach ($array1 as $item) { $utype_ids[$item->utype_id] = 1; } var_export(array_filter( $array2, function($v) use ($utype_ids) { return !isset($utype_ids[$v->id]); } ));
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`