The above example will output: Array ( [a] => green [0] => red ) 2.array_intersect_assoc() Based on the previous function, return key-value pairs with the same key and value in all arrays. Example:
The above example will output: Array ( [a] => green ) 3.array_diff() Carries multiple arrays and returns a new array composed of all the values that are in the first array but not in the following arrays. The corresponding keys are taken from the first array. Example:
The above example will output: Array ( [1] => blue ) 4.array_diff_assoc() Based on the previous function, not only the values but also the keys need to be matched. Example:
The above example will output: Array ( => brown [c] => blue [0] => red ) |