array_combine

Syntax:array array_combine ( array $keys , array $values )
Description:Creates an array by using one array for keys and another for its values

<?php
$a = array('green', 'red', 'yellow');
$b = array('avocado', 'apple', 'banana');
$c = array_combine($a, $b);

print_r($c);
?>

OUTPUT

<?php
Array ( 
[green] => avocado 
[red] => apple 
[yellow] => banana )
?>