I have two arrays and I have to compare them against each other:
$a = array('BRANCH','ADDRESS','MOBILE','NAME');
$b = array('BRANCH','ADDRESS','MOBILE','NAME');
$a == $b → true
But when the values are in a different order, this comparison doesn't work:
$a = array('BRANCH','ADDRESS','MOBILE','NAME');
$b = array('NAME','BRANCH','MOBILE','ADDRESS');
$a == $b → false
How do i compare these two arrays to see if both contain the same values, regardless of their order?