I needed a quick function to search through a multi-dimensional array. This might be a useful addition to the array helper.
/**
* Just a quick handy function to search down through multi-dimensional arrays
*/
function deep_in_array($value, $array) {
foreach($array as $item) {
if(!is_array($item)) {
if ($item == $value) return true;
else continue;
}
if(in_array($value, $item)) return true;
else if(deep_in_array($value, $item)) return true;
}
return false;
}
