我有以下格式的数组:
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
)
)
我正在遍历它,但想知道是否可以按total?
编辑:我当前的 foreach 循环
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>';
}
小怪兽爱吃肉