Mojilo Mojilo - 1 year ago 131
PHP Question

array_intersect_key with three array in php

I have three array from dynamic data in php for example :

array1 = array('10-11-2015'=>23.6,

array2 = array('10-11-2015'=>8.7,

array3 = array('10-11-2015'=>5.8,

I just need common keys from this three array

newarray = array('10-11-2015','12-11-2015');

I use
but it is for only two array.

How I can get it form three or more array ?

Answer Source

Something like this?

array_keys(array_intersect_key($array1, $array2, $array3));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download