Sorting Array in php?
<p>i have an array like this </p>

<p><code>[{"id"="1","rating"=&gt;[{"rating"=&gt;"1"}]},{"id"="2","rating"=&gt;[{"rating"=&gt;"2"}]},{"id"=&gt;"3","rating"=&gt;[{"rating"=&gt;"3"}]}]</code></p>

<p>here i need sort key based "rating" i need to expect output is </p>

<pre><code>[{"id"="3","rating"=&gt;[{"rating"=&gt;"3"}]},{"id"="2","rating"=&gt;[{"rating"=&gt;"2"}]},{"id"=&gt;"1","rating"=&gt;[{"rating"=&gt;"1"}]}] 
</code></pre>

<p>can any one please guide how can i get this </p>

<p>Thanks for advance.</p>
