I have a multidimensional array containing child arrays in the following format:
[0] Array =>
(
[first] => Foo
[second] => Bar
)
[1] Array =>
(
[first] => Foo
[second] => Bar
)
[2] Array =>
(
[first] => Foo
[second] => bingo
)
[3] Array =>
(
[first] => jackpot
[second] => bar
)
I would like to search the entire array for 'bingo' and 'jackpot' and remove any child arrays that do not contain these values (in the above example, array 0 and array 1 should be removed).
I understand how to search the array using array_search('bingo', $myarray) but not how to remove the other two. Is there a simple way to achieve this?