![]() |
sortdescending
How are sortascending() and sortdescending() sorting the array? I know it sorts by lowest/highest first.
So for the most part I have a number infront of a few words because I was hoping when i sortdescending() it would arrange them by the numbers. Eventually this is the output afterwords PHP Code:
Its more of a question of how this functions. |
I doubt it would be able to sort an array with different data types.... It would be cool if you can add a param like sortdescending("int"); or similar >_<
|
Quote:
sortdescending(0); maybe like you said could sort the array by all the [0] elements. That would be handy. |
You're better off using sorting algorithms.
|
sortascending() and sortdescending() are currently only sorting by string value. There is also the function obj.sortbyvalue(varname,vartype,ascending) although it only sorts by variables of the array members, not by the content of the array member itself, eventually sortbyvalue() could be expanded to also allow that
|
| All times are GMT +2. The time now is 10:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.