pocobueno1388 Posted June 21, 2010 Share Posted June 21, 2010 I am having issues sorting an array that come from a SimpleXMLElement Object. The array looks like this: SimpleXMLElement Object ( [www] => SimpleXMLElement Object ( [allen] => SimpleXMLElement Object ( [city] => Allen [area] => Allen [county] => Collin [state] => Texas ( ) [newcontent] => text content ) [addison] => SimpleXMLElement Object ( [city] => Addison [area] => Addison [county] => Dallas [state] => Texas ( ) [newcontent] => text content ) [amarillo] => SimpleXMLElement Object ( [city] => Amarillo [area] => Amarillo [county] => Potter [state] => Texas ( ) ) ) I want to sort it by city in alphabetical order. This array is being populated from an XML file. I know you can make a XSLT template to sort an XML file, but I can't figure out how to do that. If anyone could help, it would be greatly appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.