PHP array_udiff() functionThe array_udiff( ) function is an inbuilt function of PHP. The array_udiff( ) function is used to compute the difference of given arrays by using a callback function for data comparison. This function was introduced in PHP 5.1.0. SyntaxParameters
Return ValuesThe array_udiff( ) function returns an array containing the entries from array1 that are not present in any of the other arrays. Important note:User-defined function must returns an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument. Example 1Output: Array ( [a] => A [b] => HTML [c] =>javatpoint ) Example 2Output: Array ( [c] => ruby ) Example 3Output: Array ( [d] => Java [r] => HTML ) Example 4Output: Array ( [a] =>bengaluru [b] =>chennai )
Next TopicPHP Array Functions
|