Announcement

Collapse
No announcement yet.

sort a 2D array?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kent Multer
    replied
    This should help: http://themagicm.com/store/a-new-miv...-function.html

    Leave a comment:


  • ids
    started a topic sort a 2D array?

    sort a 2D array?

    I haven't needed to sort an array in a while and not getting results for some reason with current sorting functions. Probably a simple thing, but not sure what.

    My array is rows and columns(about 15). I need to have the returned array sorted by the first column, ie: myarray[x][1], ascending or descending. If values of the first column match (uppercase equals lower case) it doesn't matter which row is listed first. The actual need is to make sure that if there are 5 rows of the same value in the 1st column they are returned in the array in the same sequential block of 5.

    I did think the array_sort_by method would work, It didn't probably because the column index isn't an array member.

    What is my solution?

    Thanks,

    Scott
Working...
X