Skip to content
Advertisement

I have two array in php. Need to combing in one at following way [closed]

I have two arrays:

JavaScript

I need to create an array with two dimensions consisting of the elements of these two arrays in a specific way:

JavaScript

Array1 and Array2 always have the same number of elements. How can I do this?

Advertisement

Answer

You can do it this way:

JavaScript

Result:

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement