title: Get arrays between two values of an array
body: <p>I am working on an array and I would like to get all the arrays between two values of an array eg</p>
  
  <pre><code>$fields = array(
   'a' =&gt; array(
    'name' =&gt; 'username',
    'type' =&gt; 'text',
    ),
   'b' =&gt; array(
    'name' =&gt; 'birthday',
    'type' =&gt; 'text',
    ),
   'c' =&gt; array(
    'name' =&gt; 'address',
    'type' =&gt; 'text',
    ),
   'd' =&gt; array(
    'name' =&gt; 'password',
    'type' =&gt; 'text',
    ),
  );
  </code></pre>
  
  <p>So that given <code>username</code> and <code>password</code> I want to get the following</p>
  
  <pre><code> 'b' =&gt; array(
    'name' =&gt; 'birthday',
    'type' =&gt; 'text',
    ),
   'c' =&gt; array(
    'name' =&gt; 'address',
    'type' =&gt; 'text',
    ),
  </code></pre>
  
  <p>Simply because it comes after the array with the value of username and before the array with value of password</p>
  
  <p>Thanks</p>