5
I need to mount a two-dimensional array through 2 arrays received via post.
Example of arrays I receive:
Array
(
[0] => disc03
[1] => disc04
)
Array
(
[0] => prof03
[1] => prof04
)
From the two, I need to assemble the following output:
Array
(
[0] => Array
(
[disciplina] => disc03
[professor] => prof03
)
[1] => Array
(
[disciplina] => disc04
[professor] => prof04
)
)
Basically I need to unite them where the keys are equal, but by changing the value of the key to 'discipline' and 'teacher' respectively. The goal is to make multiple Inserts in the database using an array.
(Usage Codeigniter 3)
Thank you very much Anderson! It worked perfectly!
– Reginaldo Boeke