note 72582 added to function.asort
| From: | smileaf at smileaf dot org | Date: | Thu, 25 Jan 2007 02:34:05 +0000 |
| Subject: | note 72582 added to function.asort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-122170@lists.php.net to get a copy of this message | ||
Ok I was mistaken, after re-reading the previous post the ".$key" is important. What
caused the sorting issue for me wasn't that at all. But rather something else.
doing an: asort($records, $flags); before returning fixes the sorting problems.
The sorting problem I was refearing to causes a character based sorting done on numeric data.
so instead of:
1
2
3
...
10
12
20
It was returned back as
1
10
12
2
20
3
...
basically what I was trying to fix in the first place.
----
Server IP: 69.147.83.197
Probable Submitter: 71.217.222.120
----
Manual Page -- http://www.php.net/manual/en/function.asort.php
Edit -- https://master.php.net/note/edit/72582
Del: integrated -- https://master.php.net/note/delete/72582/integrated
Del: useless -- https://master.php.net/note/delete/72582/useless
Del: bad code -- https://master.php.net/note/delete/72582/bad+code
Del: spam -- https://master.php.net/note/delete/72582/spam
Del: non-english -- https://master.php.net/note/delete/72582/non-english
Del: in docs -- https://master.php.net/note/delete/72582/in+docs
Del: other reasons-- https://master.php.net/note/delete/72582
Reject -- https://master.php.net/note/reject/72582
Search -- https://master.php.net/manage/user-notes.php