php - make one array the key and another array the value -


this question has answer here:

say have 2 arrays, first array is:

array (     [3] => 1     [4] => 2 ) 

the seccond array:

array (     [0] => first     [1] => second ) 

i looking way grab values each array, , make array so:

array (     [one] => first     [two] => second ) 

so value first array becomes key , value second array value in new array. if makes sense @ all.

you need array_combine function of php

array_combine($array1,$array2); 

here $array1 keys , $array2 values


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -