PHP Classes

Number sorting error

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in

      Array Multi Sort  >  All threads  >  Number sorting error  >  (Un) Subscribe thread alerts  
Subject:Number sorting error
Summary:Error in class
Author:manolo cacho
Date:2005-11-02 15:13:31
Update:2014-06-26 13:21:44

  1. Number sorting error   Reply   Report abuse  
Picture of manolo cacho manolo cacho - 2005-11-02 15:13:31
The sort function fails when the class tries to sort a column with negatives numbers. By example, use children column and set negative numbers in. (-2, -4, 0, 3) The sort process will fail.

  2. Re: Number sorting error   Reply   Report abuse  
Picture of Alexandar Minkovsky Alexandar Minkovsky - 2014-06-26 13:21:44 - In reply to message 1 from manolo cacho
Been many years i didn't look at this code ;)
If not specified, comparison used will be strnatcasecmp.
To sort negative numbers, you will need to provide custom compare function.