What Difference between array_merge and array_combine in php
Merge one or more arrays
Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one.
If the input arrays have the same string keys, then the later value for that key will overwrite the previous one or if the arrays contain numeric keys, then the later value will not overwrite the original value and will be appended.
Values in the input array with numeric keys will be renumbered with incrementing keys starting from zero in the result array.
Have a look on example below
“red”, 2, 4);
$array2 = array(“a”, “b”, “color” => “green”, “shape” => “trapezoid”, 4);
$result = array_merge($array1, $array2);
[color] => green
 => 2
 => 4
 => a
 => b
[shape] => trapezoid
 => 4
Creates an array by using one array for keys and another for its values
[green] => avocado
[red] => apple
[yellow] => banana