title: How to sort an associative array in php
body: <p>I have mysql table i.e</p>
  
  <pre>
  id | a | b | c | d |ud_id
   1 | 20| 8 | 45| 18| 1
  </pre>
  
  <p>Now I want to retrieve that data in php sort the array and find the highest field in this example (c=45)</p>
  
  <pre>
  $query="SELECT `a`, `b`, `c`, `d` from table where ud_id=1";
  $rs=mysql_query($query) or die(mysql_error());
  $row=mysql_fetch_array($rs);
  </pre>
  
  <p>But how can I sort this associative array and find the highest key?</p>