How can the keys of one array be used to match corresponding values from another array in PHP?

To match corresponding values from two arrays based on their keys in PHP, you can use the array_intersect_key() function. This function compares the keys of two arrays and returns an array containing key-value pairs that are present in both arrays. By using array_intersect_key(), you can easily retrieve values from one array based on the keys of another array.

```php
$array1 = ['A' => 1, 'B' => 2, 'C' => 3];
$array2 = ['A' => 'apple', 'B' => 'banana', 'D' => 'orange'];

$matchedValues = array_intersect_key($array2, $array1);

print_r($matchedValues);
```

In this example, $matchedValues will contain the values 'apple' and 'banana' from $array2, which correspond to the keys 'A' and 'B' in $array1.