Answers for "php array equality"

PHP
2

php array equality

$arraysAreEqual = ($a == $b); 	// TRUE if $a and $b have the same key/value pairs.
$arraysAreEqual = ($a === $b); 	// TRUE if $a and $b have the same key/value pairs 
								//		in the same order and of the same types.
$arraysAreEqual = (array_diff($a, $b)==[] && array_diff($a, $b) == []);
Posted by: Guest on May-23-2021

Browse Popular Code Answers by Language