note 84558 deleted from function.array-diff by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 Sep 2009 00:57:25 +0000 |
| Subject: | note 84558 deleted from function.array-diff by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160391@lists.php.net to get a copy of this message | ||
Note Submitter: paperino at titi dot de
----
A creative but exact (and slow) way to see if two array are different.
<?php
$diff= (count(array_intersect($arr1,$arr2)) == count(array_unique(array_merge($arr1,$arr2)))) ?
FALSE : TRUE;
?>