How to remove values of a multidimensional array by condition?

There is an array of type:
id = 1, name = Bob
id = 2, name = Kate

is it possible somehow to delete all the records in this multidimensional array, where something of type id IN(1,5,10) ??
July 9th 19 at 10:38
1 answer
July 9th 19 at 10:40
Solution
For example:
$filteredArray = array_filter($array, function ($row) {
return in_array($row['id'], [1, 5, 10]);
});

PS. write from your phone, the mobile version has no formatting.
thank you! - christina commented on July 9th 19 at 10:43

Find more questions by tags PHP