I have two arrays that look like this:
array 1:
Array
(
[0] => name
[1] => age
[2] => job
)
array 2:
Array
(
[0] => name
[1] => toan
[2] => age
[3] => 21
[4] => job
[5] => coder
)
Now, I would like to take the values from keys 0, 2, 4 and make those values their own keys that point to the values in keys 1, 3, 5 in the array, like so:
Array
(
[name] => toan
[age] => 21
[job] => coder
)
What is simple and fast way to do this?
array_keys()andarray_key_exists()oris_set()...