Login   Register  
PHP Classes
elePHPant
Icontem

Array Milti Sort problem

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Array Multi Sort  >  All threads  >  Array Milti Sort problem  >  (Un) Subscribe thread alerts  
Subject:Array Milti Sort problem
Summary:How does this class work?
Messages:3
Author:Don Proshetsky
Date:2010-10-19 16:45:19
Update:2010-10-19 20:47:57
 

  1. Array Milti Sort problem   Reply  
Picture of Don Proshetsky
Don Proshetsky
2010-10-19 16:45:19
I have an array of customer accounts. Each element contains an array of data for each customer. I want to sort by column 12 (the ZONE) and then by an additional column of the users choosing. So I am adding two sort columns

What I expect to see is the array first sorted by the first added column and then a sub-sort by the second added column with no mix up of data.

What is happening is that the data in the first added column no longer corresponds to the original row entry. This renders this class useless.

  2. Re: Array Milti Sort problem   Reply  
Picture of Don Proshetsky
Don Proshetsky
2010-10-19 16:45:30
I have an array of customer accounts. Each element contains an array of data for each customer. I want to sort by column 12 (the ZONE) and then by an additional column of the users choosing. So I am adding two sort columns

What I expect to see is the array first sorted by the first added column and then a sub-sort by the second added column with no mix up of data.

What is happening is that the data in the first added column no longer corresponds to the original row entry. This renders this class useless.

  3. Re: Array Milti Sort problem   Reply  
Picture of Alexandar Minkovsky
Alexandar Minkovsky
2010-10-19 20:47:58 - In reply to message 2 from Don Proshetsky
A sample of data and Your code would be usefull, like:
print_r(original_array);
//some coding here
print_r(sorted_array);