title: Array sorting by key value in php
body: <p>I would like to sort below array based on amount but I don't know how. Anyone help me </p>
  
  <pre><code>Array(
      [0] =&gt; Array
       (
            [id] =&gt; 1
            [amount] =&gt; 20
       )
       [1] =&gt; Array
       (
            [id] =&gt; 2
            [amount] =&gt; 30
       )
       [2] =&gt; Array
       (
            [id] =&gt; 3
            [amount] =&gt; 10
       )
  )
  </code></pre>