EagerWolf Posted May 9, 2007 Share Posted May 9, 2007 I am trying to sort array alphabetically ... But I have a problem.. $array = array( '1' => 'a', '2' => 'c', '3' => 'b' ); When I sort this array I get this: [code] $array = array( '1' => 'a', '2' => 'b', '3' => 'c' ); But I want to get this: [code] $array = array( '1' => 'a', '3' => 'b', '2' => 'c' ); I want key words to be sorted as well ... Thanks for your help![/code][/code] Link to comment https://forums.phpfreaks.com/topic/50629-sort-array-alphabeticaly/ Share on other sites More sharing options...
c_shelswell Posted May 9, 2007 Share Posted May 9, 2007 Hi i found something great for this if you go to http://uk.php.net/usort then search for arfsort it's the second post (you'll find 2 arfsorts) posted by martin # classaxe com <><16-May-2006 08:07 hope this helps Link to comment https://forums.phpfreaks.com/topic/50629-sort-array-alphabeticaly/#findComment-248863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.