<?php $blacklist = [ (object)["id" => 22,"accessid" => 2, "utype_id" => 11, "discount" => 3434, "published" => 1], (object)["id" => 23,"accessid" => 2, "utype_id" => 14, "discount" => 2, "published" => 1] ]; $rows = [ (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] ]; foreach ($blacklist as $disqualifier) { // iterate the blacklist foreach ($rows as $index => $row) { // iterate the list to be checked if ($row->id === $disqualifier->utype_id) { // if row should be disqualified unset($rows[$index]); // remove the row break; // stop checking the $rows for this $disqualifier } } } var_export($rows);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`