Array_combine() –
use of this function you can combine two arrays for creating one array as key and value pare.
Syntax-
array_combine(keys, values)
There is two params, first one is set of keys and second one is values.
Example-
<?php
$keys=array(“1”,“2”,“3”);
$values=array(“one”,“two”,“three”);
$array=array_combine($keys,$values);
print_r($array);
Output//
Array ( [1] => one [2] => two [3] => three )
?>