Re-sort an array's element by one of their element
<p>I met a problem with array sorting.</p>

<p>My array's structure is like this: </p>

<pre><code>array(4) {
  [1]=&gt;
  array(5) {
    ["type"]=&gt;
    string(4) "A"
    ["index"]=&gt;
    int(1)
  }
  [2]=&gt;
  array(5) {
    ["type"]=&gt;
    string(4) "B"
    ["index"]=&gt;
    int(4)
  }
  [3]=&gt;
  array(5) {
    ["type"]=&gt;
    string(4) "C"
    ["index"]=&gt;
    int(2)
  }
  [4]=&gt;
  array(5) {
    ["type"]=&gt;
    string(4) "D"
    ["index"]=&gt;
    int(3)
  }
}
</code></pre>

<p>As you can see, inside each child array, there's a key "index", and the value there was not in the correct order 1-2-3-4 but it's 1-4-2-3.</p>

<p>How I can sort this array so that its children arrays were listed in correct order ?</p>

<p>P.S.: The acutal array is much bigger&amp;more complicated than this one.</p>
