I have mysql table i.e
id | a | b | c | d |ud_id 1 | 20| 8 | 45| 18| 1
Now I want to retrieve that data in php sort the array and find the highest field in this example (c=45)
$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);
But how can I sort this associative array and find the highest key?