public static function unique($array)
    {
        $suitable = true;
        foreach ($array as $k => &$v) {
            if (is_array($v)) {
                $v = self::unique($v);
            } elseif (!is_int($k)) {
                $suitable = false;
            }
        }

        return $suitable ? self::uniqueFlat($array) : $array;
    }
public static function unique($array)
    {
        $suitable = true;
        foreach ($array as $k => &$v) {
            if (is_array($v)) {
                $v = self::unique($v);
            } elseif (!is_int($k)) {
                $suitable = false;
            }
        }

        return $suitable ? self::uniqueFlat($array) : $array;
    }
public static function unique ( $ array ) { $ suitable = true ; foreach ( $ array as $ k => & $ v ) { if ( is_array ( $ v ) ) { $ v = self :: unique ( $ v ) ; } elseif ( ! is_int ( $ k ) ) { $ suitable = false ; } } return $ suitable ? self :: uniqueFlat ( $ array ) : $ array ; }
Recursively removes duplicate values from non-associative arrays.
Recursively removes duplicate values from non - associative arrays .