I have two arrays and I need to get the content when the array same Key
I'm using array_intersect_key to get the same key and it returns this result:
Array1 :
(
[NewYork] = "5,NewYork";
[london] = "20,london";
[Pari] = "40,Pari";
)
Array2 :
(
[China] = "14,China";
[london] = "40,london";
[Tokyo] = "2,Tokyo";
)
Result
array_intersect_key(Array1,Array2); it return : [london] = "20,london";
But I need to show [london] = "20,london"; and [london] = "40,london";
or something like this [london] = "20,london|40,london";
Without a loop I have a large file
Thank you!