PHP array_intersect() Function
The array_intersect() function compares arrays and returns the values that are present in all of them.
Syntax
array_intersect(array $array, array ...$arrays): array
Try It Online
Output
Click Run to execute your code
Enjoying these tutorials?