1.Get them from XML (you seem to be able to do that).
2.Put them in an array
3.sort()
the array, if your items are more complex. possibly using usort()
:
$d = new SimpleXMLElement('<root>
<item>
<price>1234</price>
</item>
<item>
<price>4123</price>
</item>
<item>
<price>3142</price>
</item>
<item>
<price>2431</price>
</item>
</root>');
$items = array();
foreach($d->item as $item) $items[] = $item;
function _mysort($a,$b){return $a->price - $b->price;}
usort($items,'_mysort');
var_dump($items);
Wrikken
2010-07-21 17:38:20