Return to Snippet

Revision: 62164
at February 6, 2013 06:00 by MaxHudson


Initial Code
function arraysEqual(arr1, arr2) {
	if(arr1.length !== arr2.length)
		return false;
	for(var i = arr1.length; i--;) {
		if(arr1[i] !== arr2[i])
			return false;
	}
	return true;
}

Initial URL

                                

Initial Description
Checks if two given arrays equal each other as php doesn't have a built in function for this.

Initial Title
Check if arrays equal each other

Initial Tags
array, function

Initial Language
PHP