title: PHP compare array
body: <p>Is there anyway to compare arrays in php using an inbuilt function, short of doing some sort of loop?</p>
  
  <pre><code>$a1 = array(1,2,3);
  $a2 = array(1,2,3);
  
  if (array_are_same($a1, $a2)) {
      // code here
  }
  </code></pre>
  
  <p>Btw, the array values will not always be in the same order.</p>