PHP array_combine() Function
Example 1
<?php
$a1=array("a","b","c","d");
$a2=array("Cat","Dog","Horse","Cow");
print_r(array_combine($a1,$a2));
?>
Example 2
The output of the code above will be:
Array ( [a] => Cat [b] => Dog [c] => Horse [d] => Cow )




Reply With Quote

Bookmarks