What is the purpose of using array_combine in PHP when merging two arrays?

When merging two arrays in PHP, the array_combine function can be used to create a new array where one array serves as keys and the other as values. This function is useful when you want to combine two arrays into a single associative array, where one array provides the keys and the other provides the corresponding values.

// Example of using array_combine to merge two arrays
$array1 = array('a', 'b', 'c');
$array2 = array(1, 2, 3);

$combinedArray = array_combine($array1, $array2);

print_r($combinedArray);