如何使数组键在整个数组中都是唯一的

时间:2015-12-24 14:32:15

标签: php arrays unique

如何使数组键唯一? 我试过A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: models/mdashboard.php Line Number: 115 ,但它会抛出:

Array
(
    [100053] => 100053
    [100072] => 100072
    [100054] => 100054
    [100055] => Array
        (
        [100056] => Array
            (
                [100057] => 100057
                [100058] => 100058
                [100059] => 100059
                [100060] => 100060
                [100071] => 100071
            )

        [100061] => Array
            (
                [100063] => 100063
                [100062] => Array
                    (
                        [100065] => 100065
                        [100066] => Array
                            (
                                [100067] => 100067
                                [100068] => 100068
                                [100069] => 100069
                                [100070] => 100070
                            )

                        [100064] => 100064
                    )

            )

    )

    [100056] => Array
    (
        [100057] => 100057
        [100058] => 100058
        [100059] => 100059
        [100060] => 100060
        [100071] => 100071
    )

    [100061] => Array
    (
        [100063] => 100063
        [100062] => Array
            (
                [100065] => 100065
                [100066] => Array
                    (
                        [100067] => 100067
                        [100068] => 100068
                        [100069] => 100069
                        [100070] => 100070
                    )

                [100064] => 100064
            )

    )

    [100062] => Array
    (
        [100065] => 100065
        [100066] => Array
            (
                [100067] => 100067
                [100068] => 100068
                [100069] => 100069
                [100070] => 100070
            )

        [100064] => 100064
    )

    [100066] => Array
    (
        [100067] => 100067
        [100068] => 100068
        [100069] => 100069
        [100070] => 100070
    )

)

这是数组:

BAN

0 个答案:

没有答案