Is there any fast way to get all subarrays where a key value pair was found in a multidimensional array? I can\'t say how deep the array will be.
Simple example arra
$result = array_filter($arr, function ($var) { $found = false; array_walk_recursive($var, function ($item, $key) use (&$found) { $found = $found || $key == "name" && $item == "cat 1"; }); return $found; });