Create an array using one array as keys and another as values in PHP
Description
The following code shows how to create an array using one array as keys and another as values.
Example
//from w ww . j a va 2 s .co m
<?php
$a = array('green', 'red', 'yellow');
$b = array('HTML', 'CSS', 'PHP');
$c = array_combine($a, $b);
print_r($c);
?>
The code above generates the following result.