/ Published in: PHP
Checks if two given arrays equal each other as php doesn't have a built in function for this.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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; }