PHP array_uintersect_assoc() Function

What is array_uintersect_assoc() Function?


The "array_uintersect_assoc()" function computes the intersection of arrays with additional index check, compares data by a callback function.



In the above syntax "array1" and "array2" are compared in the user defined function for values, and for keys in the built in function ,then returns an array of elements from "array1".

Example :

function funct1($x1,$x2)
if ($x1===$x2)
return 0;
return 1;
Result :

Array ( [a]=> Orange );

In the above example the values, keys of both arrays are compared to find the intersection of array elements, which is returned in an array.

PHP Topics

Ask Questions

Ask Question