Merge two arrays as key value pairs in PHP -


i've got 2 arrays of same size. i'd merge 2 values of 1 key indexes of new array, , values of new array values of other.

right i'm looping through arrays , creating new array manually, have feeling there more elegant way go this. don't see array functions purpose, maybe missed something? there simple way along these lines?

$mapped_array = mapkeys($array_with_keys, $array_with_values); 

see array_combine() on php.net.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -