[code]function multi_array_search($needle, $haystack, $strict = false, $s_key = false, $bugfix = false){
foreach($haystack as $key => $value){
if($s_key) $check = $key;
else $check = $value;
if(is_array($value) &&
multi_array_search($needle, $value, $strict, $s_key) || (
$check == $needle && (
!$strict ||
gettype($check) == gettype($needle) ||
$bugfix &&
$s_key &&
gettype($key) == 'integer' &&
gettype($needle) == 'string'
)
)
)
return true;
}
return false;
}
function in_multi_array($needle, $haystack)
{
$in_multi_array = false;
if(in_array($needle, $haystack))
{
$in_multi_array = true;
}
else
{
for($i = 0; $i < sizeof($haystack); $i++)
{
if(is_array($haystack[$i]))
{
if(in_multi_array($needle, $haystack[$i]))
{
$in_multi_array = true;
break;
}
}
}
}
return $in_multi_array;
}
[/code]