title: PHP - sort array by array key
body: <p>I have this array in PHP: </p>
  
  <p>In PHP APIs I have this array and want to sort ot by custom_price, but not getting how to acheive so ..</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id] =&gt; 1204
              [custom_price] =&gt; 33.1500
          )
  
  
      [1] =&gt; Array
          (
              [id] =&gt; 1199
              [custom_price] =&gt; 16.83
          )
  
      [2] =&gt; Array
          (
              [id] =&gt; 1176
              [custom_price] =&gt; 16.83
          )
  
      [3] =&gt; Array
          (
              [id] =&gt; 1173
              [custom_price] =&gt; 11.73
          )
  
      [4] =&gt; Array
          (
              [id] =&gt; 1170
              [custom_price] =&gt; 22.5
          )
  )
  </code></pre>
  
  <p>How i can sort from .. high to low &amp; low to high .. by custom_price</p>