I am using php and i have two arrays, and i want the values that are common in two arrays, with same index like
Array 1([0] = [Destnation] [1] = [Price] [2] = [Test])
Array 2([1] = [Destnation] [0] = [Price] [2] = [Test])
So in the above arrays i want the output as
Array 3([2] = [Test])
Because the other two values have changed there index
I have used array_intersect(), but it is giving all the values.
Just try with
array_intersect_assocIt will compare keys and values.