Here is the function to check in multidimensional array.
public static function inarray($search,$array,$key_=NULL)
{
if(is_array($array))
{
if(!in_array( $search,$array))
{
foreach ($array as $key => $value) {
Common::inarray($search, $value,$key);
}
}
else {
return $key_;
}
}
else {
echo FALSE;
}
}
This function not returning any value but it is working.