lundi 25 mai 2020

How to merge two arrays by desired result with PHP?

I have a problem merging two arrays into one.

There are two arrays, which are $count1 & $count2.

$count1 gives:

enter image description here

$count2 gives:

enter image description here

The desired result is, that there would be two arrays assigned to one variable, like $counts, which I could reach by indexing the first array key, like [0], and the another one by index of [1].

I want to list all information to blade template but I need to combine these to arrays into one.

How could I achieve this?

array_merge function returns only one array.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire