title: Split 2d array PHP
body: <p>I have a 2d array as such :</p>
  
  <pre><code>   Array
          (
            [0] =&gt; Array([nid] =&gt; 5),
            [1] =&gt; Array([nid] =&gt; 6),
            [2] =&gt; Array([nid] =&gt; 7),......
  </code></pre>
  
  <p>I want to <code>split</code> the <code>array</code> by key into two parts. 
  For example I want to split the array at key = 1. 
  I need the result as two arrays <code>arr1</code> holding key <code>0 &amp; 1</code> and <code>arr2</code> holding key <code>2</code>.
  Can anyone help me out?</p>