Sort Multidimensional Array by Value
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2699086/php-sort-multidimensional-array-by-value">PHP sort multidimensional array by value</a>  </p>
</blockquote>



<p>I would like to sort a multidimensional array based on a specific value (population in this case) while keeping the association (numerical indexes are of no importance).</p>

<pre><code>array(
    array(
    'code'=&gt;'usa',
    'name'=&gt;'United States',
    'population'=&gt;100
    ),
    array(
    'code'=&gt;'de'
    'name'=&gt;'Denmark',
    'population'=&gt;20
    )
    array(
    'code'=&gt;'tr'
    'name'=&gt;'Turkey',
    'population'=&gt;30
    )
);
</code></pre>
