How to check if two arrays contain the same values?
<p>I have two arrays and I have to compare them against each other:</p>

<pre><code>$a = array('BRANCH','ADDRESS','MOBILE','NAME');
$b = array('BRANCH','ADDRESS','MOBILE','NAME');

$a == $b → true
</code></pre>

<p>But when the values are in a different order, this comparison doesn't work:</p>

<pre><code>$a = array('BRANCH','ADDRESS','MOBILE','NAME');
$b = array('NAME','BRANCH','MOBILE','ADDRESS');

$a == $b → false
</code></pre>

<p>How do i compare these two arrays to see if both contain the same values, regardless of their order?</p>