Created
November 28, 2011 13:36
-
-
Save marekkalnik/1400418 to your computer and use it in GitHub Desktop.
Array diff withe one level recursiveness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array1 = array( | |
array('code' => 1, 'quantity' => 2) | |
); | |
$array2 = array( | |
array('code' => 1, 'quantity' => 2) | |
); | |
$array3 = array( | |
array('code' => 1, 'quantity' => 3) | |
); | |
(bool) array_udiff($array1, $array2, 'array_diff'); // false | |
(bool) array_udiff($array1, $array3, 'array_diff'); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment