title: Reverse array in php
body: <pre><code>array(7) {
    [0]=&gt; array(2) { ["id"]=&gt; string(1) "9"  ["roi"]=&gt; float(0)    }
    [1]=&gt; array(2) { ["id"]=&gt; string(1) "1"  ["roi"]=&gt; float(0)    }
    [2]=&gt; array(2) { ["id"]=&gt; string(2) "10" ["roi"]=&gt; float(0)    }
    [3]=&gt; array(2) { ["id"]=&gt; string(2) "14" ["roi"]=&gt; float(0)    }
    [4]=&gt; array(2) { ["id"]=&gt; string(1) "4"  ["roi"]=&gt; float(0)    }
    [5]=&gt; array(2) { ["id"]=&gt; string(1) "5"  ["roi"]=&gt; float(141)  }
    [6]=&gt; array(2) { ["id"]=&gt; string(1) "6"  ["roi"]=&gt; float(2600) }
  }
  </code></pre>
  
  <p>I would just like to reverse this, so id 6 (with roi of 2600) comes first in the array etc.</p>
  
  <p>How can I do this? <code>array_reverse()</code> and <code>rsort()</code> does not work in this case</p>