\[code\] <?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>\[/code\]While request the xml i reciveing xml response which is give result in ascending order. I need XML response in descending order and need no of rows in total.