PHP sorting according sub array
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1795244/sorting-a-multidimensional-array-in-php">Sorting a multidimensional array in PHP?</a>  </p>
</blockquote>



<pre><code>   $songs =  array(
    '1' =&gt; array('artist'=&gt;'The Smashing Pumpkins', 'songname'=&gt;'Soma'),
    '2' =&gt; array('artist'=&gt;'The Decemberists', 'songname'=&gt;'The Island'),
    '3' =&gt; array('artist'=&gt;'Fleetwood Mac', 'songname' =&gt;'Second-hand News')
);
</code></pre>

<p>Answer should come like this:</p>

<pre><code>   Array(
[0] =&gt; Array
    (
        [artist] =&gt; Fleetwood Mac
        [song] =&gt; Second-hand News
    )

[1] =&gt; Array
    (
        [artist] =&gt; The Decemberists
        [song] =&gt; The Island
    )

[2] =&gt; Array
    (
        [artist] =&gt; The Smashing Pumpkins
        [song] =&gt; Cherub Rock
    )
)
</code></pre>

<p>Please help me on this.</p>
