What PHP function can be used to find the common values between two arrays?
To find the common values between two arrays in PHP, you can use the `array_intersect()` function. This function takes two or more arrays as arguments and returns an array containing the values that are present in all of the input arrays. By using `array_intersect()`, you can easily find the common values between two arrays without having to manually iterate through them.
$array1 = [1, 2, 3, 4, 5];
$array2 = [3, 4, 5, 6, 7];
$commonValues = array_intersect($array1, $array2);
print_r($commonValues);