Like many others I've been creating a simple PHP/XML CMS with a wonderful tutorial on this site. Essentially it's a 'latest news' page. The stories display on the web page with the most recent item created at the top, but I want to be able to 're-shuffle' the stories based on a number I add to an XML node.I'm sure there must be a way with PHP to order the results based on a number in one of the nodes? For example:

In the above example, because it has been given the rank '1', I would like it to display first on the web page no matter when it was created. Other stories with higher numbers would appear below it. Does that make sense?!

Here is the php code that extracts the info and displays it on the web page: