i searched through the website and couldnt find exact result for my question.
i need to search through the xml file and sort the output by the order in date descending.
<?xml version="1.0"?>
<entries>
<entry>
<date>1299565881</date>
<action>made an action under category</action>
<user>Admin</user>
</entry>
<entry>
<date>1299566115</date>
<action>Item deleted</action>
<user>Admin</user>
</entry>
</entries>
here is my code
<?php
$data = simplexml_load_file($filename);
if($to_date_int>$global_date)
$op = $data->xpath('/entries/entry[date<='.$to_date_int.']');
else
$op = $data->xpath('/entries/entry');
Thanks in advance..