从php中的父数组中删除重复的数组?

时间:2018-04-07 09:52:59

标签: php arrays laravel associative-array lumen

我想从以下数组中删除重复的条目。任何想法都会让我欣赏。

Array
(
    [0] => Array
        (
            [key1] => 14
            [key2] => 32
        )

    [1] => Array
        (
            [key1] => 14
            [key2] => 11
        )

    [2] => Array
        (
            [key1] => 14
            [key2] => 11
        )

    [3] => Array
        (
            [key1] => 14
            [key2] => 31
        )

)

具有相同值的重复数组的数组键[1]和[2]。我想删除这个重复的数组,输出应该是这样的:                                           预期输出必须像这样

Array
(
    [0] => Array
        (
            [key1] => 14
            [key2] => 32
        )

    [1] => Array
        (
            [key1] => 14
            [key2] => 11
        )

    [2] => Array
        (
            [key1] => 14
            [key2] => 31
        )

)

0 个答案:

没有答案