What is array_udiff in PHP

array_udiff

Description

array array_udiff (array array1, array array2 [, array ..., callback data_compare_func])

array_udiff () returns an array containing all the values ​​of that are not present in any of the other arguments. Note that keys are preserved. For the comparison of the data is used. It must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. This is unlike array_diff () which uses an internal function for comparing the data.

Example 1. array_udiff () example

The example shown above produces the following output:

Array ([0.5] => cr Object ([priv_member: private] => 12) [0] => cr Object ([priv_member: private] => 23))

Annotation: Please note that this function only checks one dimension of an n-dimensional array. Of course you can check deeper dimensions by using.

So see array_diff (), array_diff_assoc (), array_diff_uassoc (), array_udiff_assoc (), array_udiff_uassoc (), array_intersect (), array_intersect_assoc (), array_uintersect (), array_uintersect_assoc () other array_uintersect_uassoc ().

Hosting by: Hurra Communications GmbH
Generated: 2007-01-26 17:56:57