protected function containsRecursive(&$array, &$value)
    {
        if (!is_array($array)) {
            return false;
        }

        foreach ($array as $sub) {
            if (is_string($sub) && !strcasecmp($sub, $value)) {
                return true;
            }

            if (is_array($sub) && $this->containsRecursive($sub, $value)) {
                return true;
            }
        }
        return false;
    }
protected function containsRecursive(&$array, &$value)
    {
        if (!is_array($array)) {
            return false;
        }

        foreach ($array as $sub) {
            if (is_string($sub) && !strcasecmp($sub, $value)) {
                return true;
            }

            if (is_array($sub) && $this->containsRecursive($sub, $value)) {
                return true;
            }
        }
        return false;
    }
protected function containsRecursive ( & $ array , & $ value ) { if ( ! is_array ( $ array ) ) { return false ; } foreach ( $ array as $ sub ) { if ( is_string ( $ sub ) && ! strcasecmp ( $ sub , $ value ) ) { return true ; } if ( is_array ( $ sub ) && $ this -> containsRecursive ( $ sub , $ value ) ) { return true ; } } return false ; }
Checks whether some array contains the given
data, in a recursive fashion.

\param array $array
Array to test.

\param mixed $value
Look for this specific value.

\retval bool
\b true if the given value is contained
in the passed array, \b false otherwise.
Checks whether some array contains the given data in a recursive fashion .