# How to sort Array String ascending?

**URL:** <https://forum.kirupa.com/t/how-to-sort-array-string-ascending/315277>\
**Category:** flash\
**Created:** [October 21, 2010, 6:07pm UTC](https://forum.kirupa.com/t/how-to-sort-array-string-ascending/315277 "2010-10-21T18:07:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayumilove](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ayumilove/32/2532_2.png) [@ayumilove](https://forum.kirupa.com/u/ayumilove)\
**Post date:** [October 21, 2010, 6:07pm UTC](https://forum.kirupa.com/t/how-to-sort-array-string-ascending/315277/1 "2010-10-21T18:07:26Z")

</div>

Below is a simple code that I made,

```php

var array:Array =
[
	"44,5",
	"44,3",
	"44,2",
	"44,1",
	"44,4",
	"44,6",
	"5,99"
];
array.sort();
displayArray(array);

function displayArray(array:Array):void
{
	for(var i:int = 0; i < array.length; i++)
	{
		trace(array*);
	}
}

```

**[COLOR=“Red”]It traces…[/COLOR]**  
44,1  
44,2  
44,3  
44,4  
44,5  
44,6  
5,99

**[COLOR=“Green”]I expected it to be…[/COLOR]**  
5,99  
44,1  
44,2  
44,3  
44,4  
44,5  
44,6

**[COLOR=“DarkOrchid”]Anyone knows how to solve this?[/COLOR]**
