I need to mount a two-dimensional array through 2 arrays received via post.
Sample arrays I get:
Array
(
[0] => disc03
[1] => disc04
)
Array
(
[0] => prof03
[1] => prof04
)
From the two, I need to mount the following output:
Array
(
[0] => Array
(
[disciplina] => disc03
[professor] => prof03
)
[1] => Array
(
[disciplina] => disc04
[professor] => prof04
)
)
Basically I need to join them where the keys are the same, but changing the value of the key to 'discipline' and 'teacher' respectively. The goal is to make multiple inserts in the database using an array.
(Use Codeigniter 3)