assasinkilla Posted August 11, 2007 Share Posted August 11, 2007 If i got a .xml that when someone upload adds something to the xml, but i want to order it by name... Any way? Quote Link to comment https://forums.phpfreaks.com/topic/64408-how-to-order-a-list-by-name-automatically/ Share on other sites More sharing options...
php_tom Posted August 11, 2007 Share Posted August 11, 2007 Can you post a sample of your xml? There should be a way of doing it by parsing the file into an associative array, then using PHP's sort(), but the exact code depends on the layout of your xml. Quote Link to comment https://forums.phpfreaks.com/topic/64408-how-to-order-a-list-by-name-automatically/#findComment-321139 Share on other sites More sharing options...
assasinkilla Posted August 11, 2007 Author Share Posted August 11, 2007 Thanks for the reply airservers.pirohost.com/ffa/class2010/config.xml Quote Link to comment https://forums.phpfreaks.com/topic/64408-how-to-order-a-list-by-name-automatically/#findComment-321143 Share on other sites More sharing options...
php_tom Posted August 11, 2007 Share Posted August 11, 2007 So every time somebody adds to the xml, do you add a whole new <config></config> section or just a new <play_list></play_list> ? Also, which of the fields in <play_list> do you want to sort by? <play_list>path_to_1file,1Title#path_to_2file,2Title#...#path_to_nfile,nTitle</play_list> Sorry, I just want to make sure I understand this... Quote Link to comment https://forums.phpfreaks.com/topic/64408-how-to-order-a-list-by-name-automatically/#findComment-321150 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.