G
G
gofree2018-02-24 18:56:50
PHP
gofree, 2018-02-24 18:56:50

How to merge arrays without repeating by key?

Hello. There are such arrays

Array
(
    [0] => 80
    [1] => 80
    [2] => 80
    [3] => 90
)
Array
(
    [0] => Array
        (
            [0] => 195
        )

    [1] => Array
        (
            [0] => 195
        )

    [2] => Array
        (
            [0] => 190
            [1] => 195
            [2] => 200
        )

    [3] => Array
        (
            [0] => 190
            [1] => 195
        )

)

How do you combine them to make it look like this?
[80] => Array
        (
            [0] => 190
            [1] => 195
            [2] => 200
        )
[90] => Array
        (
            [0] => 190
            [1] => 195
        )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-02-24
@gofree

array_combine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question