So, to simply put it, it looks like this:
Array1:
Array
(
[0] => id
[1] => name
[2] => email
)
Array2:
Array
(
[0] => 1
[1] => paula
[2] => [email protected]
[3] => 2
[4] => martin
[5] => [email protected]
[6] => 3
[7] => kasandra
[8] => [email protected]
[9] => 4
[10] => helena
[11] => [email protected]
[12] => 5
[13] => sophia
[14] => [email protected]
[15] => 6
[16] => denis
[17] => [email protected]
)
How to make those values from Array1 as keys in Array2 accordingly so that the end result looks like this:
Array
(
[id] => 1
[name] => paula
[email] => [email protected]
[id] => 2
[name] => martin
[email] => [email protected]
[id] => 3
[name] => kasandra
[email] => [email protected]
[id] => 4
[name] => helena
[email] => [email protected]
[id] => 5
[name] => sophia
[email] => [email protected]
[id] => 6
[name] => denis
[email] => [email protected]
)
$array['email']. Which one will it print?{"id": 1, "name: "paula", "email": "[email protected]" }