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? 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. 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 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... 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
Archived
This topic is now archived and is closed to further replies.