note 13153 deleted from function.array-diff by irc-html

From: Date: Sat, 19 Jan 2002 20:59:18 +0000
Subject: note 13153 deleted from function.array-diff by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25450@lists.php.net to get a copy of this message
(replace the 'grave' => '`' marks with ' ' for real code) There might be an easier way for checking array equality, but I found this double checking of the array_diff to be what works for me. function arrays_equal( $array1, $array2 ){ ``if ( 0 != count( array_diff( $array1, $array2 ) ) + ````````````count( array_diff( $array2, $array1 ) ) ){ ````return 0; ``} else { ````return 1; ``} }

« previous php.notes (#25450) next »