اگر میخواهی مشترکها رو بگیری با array_intersect()

https://www.w3schools.com/php/func_array_intersect.asp