IMakeLousyCode Posted September 11, 2006 Share Posted September 11, 2006 Hi, Is there an easy way to sort an array(asort) so that a word containing "-" is sorted correctly, for instanceA-listis after Alistwith only asort, A-list is always first!Thanks Link to comment https://forums.phpfreaks.com/topic/20418-sorting-array-in-alpabetical-order-words-containg/ Share on other sites More sharing options...
ober Posted September 11, 2006 Share Posted September 11, 2006 That's because alphabetically, it is correct. - is before l in the sorting algorithm. Link to comment https://forums.phpfreaks.com/topic/20418-sorting-array-in-alpabetical-order-words-containg/#findComment-89955 Share on other sites More sharing options...
IMakeLousyCode Posted September 11, 2006 Author Share Posted September 11, 2006 OK thanks, I will keep it this way then, if it even alphabetically correct! ;D Link to comment https://forums.phpfreaks.com/topic/20418-sorting-array-in-alpabetical-order-words-containg/#findComment-89975 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.