im having troubles with sort functions.
When i try sort in array a got bad order results.. For example:
$arr = array("Cero","Uno","dos","Tres","Cuatro","Cinco","Seis","Siete");
sort($arr);
foreach($arr as $key => $value){
echo $key . "=>" . $value . "<br/>";
}
Write :
0=>Cero
1=>Cinco
2=>Cuatro
3=>Seis
4=>Siete
5=>Tres
6=>Uno
7=>dos //wtf, last item are "d" ?!
If i try with rsort i got this:
0=>dos //again, last item are "d" ?!
1=>Uno
2=>Tres
3=>Siete
4=>Seis
5=>Cuatro
6=>Cinco
7=>Cero
I tried asort, arsort, sort and rsort, but always returns a bad order. You know why? or a method to fix it? Thanks!