lundi 15 juin 2020

merge two difffrent array from one variable in laravel

I have two different arrays from the same variable.... How can I merge it? I tried array_merge($tag); but it did not work.


$tag = Array
    (
        [0] => Array
            (
                [id] => 119
                [category_id] => 3
                [name] => Aggressive
                [active] => 
                [slug] => aggressive
                [description] => 
                [tracks] => Array
                    (
                    )

                [elements] => Array
                    (
                    )

            )

    )

    $tag = Array
    (
        [0] => Array
            (
                [id] => 290
                [category_id] => 1
                [name] => East Coast
                [active] => 
                [slug] => east-coast
                [description] => 
                [tracks] => Array
                    (
                    )

                [elements] => Array
                    (
                    )

            )

    )



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire