<?php
$xml = simplexml_load_string( $response->ApiCallDeatilDataFeedResult );
foreach ( $xml->call_data as $data )
{
?>
<tr>
<td class="sss"><?php
echo $data->call_time;?></td>
<td class="sss"><?php
$init = $data->call_duration;
$hours = floor($init / 3600);
$minutes = floor(($init / 60) % 60);
$seconds = $init % 60;
echo "$minutes Min : $seconds Sec";
?></td>
<td class="sss"><?php echo $data->call_status;?></td>
<td class="sss"><?php echo $data->caller_number;?></td>
<td class="sss"><?php echo $data->caller_name;?></td>
<td class="sss"><?php echo $data->caller_city;?></td>
<td class="sss"><?php echo $data->caller_state;?></td>
<td class="sss"><?php echo $data->caller_zip;?></td>
</tr>
<?php
}
?>
</table>
在请求 xml 时,我收到了 xml 响应,它以升序给出结果。我需要按降序排列的 XML 响应,并且总共不需要行。