Evening all!
I have an issue where I have a table colum that has various filenames.
What I need to do is sort them in a particuar way, I will try and give you an example..
The array called containes 2 types of filenames..
- AA00068945 (can be any alpha prefix)
- 83DS9263 (or any mix of characters.
When a user searches, they could get hundreds of results but mixed filenames.
The have to be sorted highest number first (arsort deliveres that one) BUT any starting AA have to come before any that dont have an alpha prefix.
Just using arsort, I typically get this sort of result..
-Keyword Elephant - Results ----------------------------
[0] [ 83DS9263 ]
[1] [ 83DS9262 ]
[2] [ 83DS9255 ]
[3] [ AA003256 ]
[4] [ AA003255 ]
[5] [ BB003208 ]
This is all and well, as it is using ersort, the results are fine.. BUT I need it to be..
-Keyword Elephant - Results ----------------------------
[0] [ AA003256 ]
[1] [ AA003255 ]
[2] [ BB003208 ]
[3] [ 83DS9263 ]
[4] [ 83DS9262 ]
[5] [ 83DS9255 ]
I hope this makes sense to someone..
Any thoughts appreciated
KF