함수 sym_diff()


symmetric difference
sym_diff

1 PHP[ | ]

$arr1 = array('A', 'B', 'C', 'D');
$arr2 = array('C', 'D', 'E', 'F');
print_r( array_values(array_diff(array_merge($arr1, $arr2), array_intersect($arr1, $arr2))) );
// Array ( [0] => A [1] => B [2] => E [3] => F )

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}