I have an array in the below format:
Array
(
    [123451000] => Array
        (
            [total] => 70
            [total_tech] => 36
            [duration] => 300
        )
    [123451001] => Array
        (
            [total] => 9
            [total_tech] => 3
            [duration] => 197
        )
    [123451002] => Array
        (
            [total] => 103
            [total_tech] => 97
            [duration] => 273
        )
)
I am looping through it, but wondered if it is possible to order by the total?
EDIT: My current foreach loop
foreach($agents as $agent => $option) {
    //$talktime = secondsToTime($x["talktime_sum"]);
    $display.= '<tr>
    <td>'.get_dtypes('phone', $agent).'</td>
    <td>'.number_format($option["total_calls"]).'</td>
    <td>'.number_format($option["technical_calls"]).'</td>
    <td>'.number_format($option["sales_calls"]).'</td>
    <td>'.number_format($option["other_calls"]).'</td>
    <td>'.$option["total_duration"].'</td>
    </tr>';
}
 
    