I have been trying to get an array to sort on a particular column and
have been having problems with my main key ...
array_multisort ($dirlist["dirname"], SORT_DESC, SORT_STRING);
This function takes an array ($dirlist) which has been loaded with a
directory listing where each directory has its own index number
("dirid") and displays the listing in descending order by name
("dirname"). This works fine for the sorting of the names but the index
number is reallocated (I assume because it is numeric) and I lose my
link to the directory. arrgghh!
How can I keep the rows 'together' and make sure that the index number
and the name remain consistant?
Any tips or snippets of syntax would be a great help.
Regards,
Alan Searle.
have been having problems with my main key ...
array_multisort ($dirlist["dirname"], SORT_DESC, SORT_STRING);
This function takes an array ($dirlist) which has been loaded with a
directory listing where each directory has its own index number
("dirid") and displays the listing in descending order by name
("dirname"). This works fine for the sorting of the names but the index
number is reallocated (I assume because it is numeric) and I lose my
link to the directory. arrgghh!
How can I keep the rows 'together' and make sure that the index number
and the name remain consistant?
Any tips or snippets of syntax would be a great help.
Regards,
Alan Searle.
Comment