public static function keyOf(array $set, $match) {
        $return = null;
        $isArray = array();

        foreach ($set as $key => $value) {
            if ($value === $match) {
                $return = $key;
            }

            if (is_array($value)) {
                $isArray[] = $key;
            }
        }

        if (!$return && $isArray) {
            foreach ($isArray as $key) {
                if ($value = static::keyOf($set[$key], $match)) {
                    $return = $key . '.' . $value;
                }
            }
        }

        return $return;
    }
public static function keyOf(array $set, $match) {
        $return = null;
        $isArray = array();

        foreach ($set as $key => $value) {
            if ($value === $match) {
                $return = $key;
            }

            if (is_array($value)) {
                $isArray[] = $key;
            }
        }

        if (!$return && $isArray) {
            foreach ($isArray as $key) {
                if ($value = static::keyOf($set[$key], $match)) {
                    $return = $key . '.' . $value;
                }
            }
        }

        return $return;
    }
public static function keyOf ( array $ set , $ match ) { $ return = null ; $ isArray = array ( ) ; foreach ( $ set as $ key => $ value ) { if ( $ value === $ match ) { $ return = $ key ; } if ( is_array ( $ value ) ) { $ isArray [ ] = $ key ; } } if ( ! $ return && $ isArray ) { foreach ( $ isArray as $ key ) { if ( $ value = static :: keyOf ( $ set [ $ key ] , $ match ) ) { $ return = $ key . '.' . $ value ; } } } return $ return ; }
Returns the key of the specified value. Will recursively search if the first pass doesn't match.

@param array $set
@param mixed $match
@return mixed
Returns the key of the specified value . Will recursively search if the first pass doesn t match .