Created
August 27, 2018 09:57
-
-
Save shyuan/3a36fd9aecf8a7ecef4a6495db9308d5 to your computer and use it in GitHub Desktop.
PHP Array Diff
This file contains hidden or 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(1,2,3,4,5,6,7); | |
$array2 = array(5,6,7,8,9,10); | |
var_dump(array_diff($array1, $array2)); | |
var_dump(array_diff($array2, $array1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment