PHP array_uintersect() function || PHP Arrays

array_uintersect() function in php

0 1414

PHP array_uintersect() function is used to return the intersection or match values of two or more arrays by comparing the values with the help of a user-defined function. It is an inbuilt function of PHP.


array_uintersect($array1,$array2,... ...,$arrayN,user_function);


  • $array1 is a PHP array which matched values returned by this function.
  • $array2,$array3 and $arrayN are also PHP arrays which values is compared with the values of $array1.
  • user_function is a user defined comparison function which used to calculate the common values of arrays by comparing the values.

Example 1:

function user_function($x,$y)
if ($x===$y)
 return 0;
 return ($x>$y)?1:-1;
echo "<pre>";


Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments