0

I need to remove all sub - array that has equal array() present in collection. In this array example only key [3] has unique values in each array. I've try array_unique but is not working.

Return where are different values in array I guess.

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [Category] => Filters
                    [CategoryId] => 1
                    [Group] => Aperture Size
                    [GroupId] => 46
                    [Id] => 1344
                    [MiscText] => 
                    [SortOrder] => 0
                    [Value] => 253mm x 40mm
                )

        [1] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 650
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Letterplate seal
            )

        [2] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 661
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Brown (BW)
            )

        [3] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Fixing Centres
                [GroupId] => 87
                [Id] => 2047
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 275mm
            )

        [4] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Overall Size
                [GroupId] => 45
                [Id] => 1329
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

        [5] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Size
                [GroupId] => 31
                [Id] => 1032
                [MiscText] => Table
                [SortOrder] => 2
                [Value] => Letterplate seal
            )

        [6] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Product Type
                [GroupId] => 18
                [Id] => 266
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

    )

[1] => Array
    (
        [0] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Aperture Size
                [GroupId] => 46
                [Id] => 1344
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 253mm x 40mm
            )

        [1] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 650
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Letterplate seal
            )

        [2] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 710
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Gold (GD)
            )

        [3] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Fixing Centres
                [GroupId] => 87
                [Id] => 2047
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 275mm
            )

        [4] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Overall Size
                [GroupId] => 45
                [Id] => 1329
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

        [5] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Size
                [GroupId] => 31
                [Id] => 1032
                [MiscText] => Table
                [SortOrder] => 2
                [Value] => Letterplate seal
            )

        [6] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Product Type
                [GroupId] => 18
                [Id] => 266
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

    )

[2] => Array
    (
        [0] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Aperture Size
                [GroupId] => 46
                [Id] => 1344
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 253mm x 40mm
            )

        [1] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 650
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Letterplate seal
            )

        [2] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 658
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Silver (SE)
            )

        [3] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Fixing Centres
                [GroupId] => 87
                [Id] => 2047
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 275mm
            )

        [4] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Overall Size
                [GroupId] => 45
                [Id] => 1329
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

        [5] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Size
                [GroupId] => 31
                [Id] => 1032
                [MiscText] => Table
                [SortOrder] => 2
                [Value] => Letterplate seal
            )

        [6] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Product Type
                [GroupId] => 18
                [Id] => 266
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

    )

[3] => Array
    (
        [0] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Aperture Size
                [GroupId] => 46
                [Id] => 1344
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 253mm x 40mm
            )

        [1] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 650
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => Letterplate seal
            )

        [2] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Finish
                [GroupId] => 24
                [Id] => 613
                [MiscText] => Table
                [SortOrder] => 1
                [Value] => White (WH)
            )

        [3] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Fixing Centres
                [GroupId] => 87
                [Id] => 2047
                [MiscText] => 
                [SortOrder] => 0
                [Value] => 275mm
            )

        [4] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Overall Size
                [GroupId] => 45
                [Id] => 1329
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

        [5] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Size
                [GroupId] => 31
                [Id] => 1032
                [MiscText] => Table
                [SortOrder] => 2
                [Value] => Letterplate seal
            )

        [6] => Array
            (
                [Category] => Filters
                [CategoryId] => 1
                [Group] => Product Type
                [GroupId] => 18
                [Id] => 266
                [MiscText] => 
                [SortOrder] => 0
                [Value] => Letterplate seal
            )

    )

> )
Slava Vedenin
  • 58,326
  • 13
  • 40
  • 59
morowind
  • 302
  • 1
  • 9
  • 24

0 Answers0