sorting multidimensional arrays issue
Posted: Thu Oct 03, 2013 9:02 am
Hi,
I'm trying to sort small arrays based on a specified key value (link), eg
I'd like to soft the array by the link value so key 0 (which has a blank value) will always be the first in the array, and the other 2 with entry's can be in what ever order they like after.
I've tried messing about with a number of array sorting functions but can't seem to figure it out, any pointers would be helpful! (ps. I know the above array is already sorted but its just an example)
I'm trying to sort small arrays based on a specified key value (link), eg
Code: Select all
Array
(
[0] => Array
(
[id] => 273113
[file] => /volume2/Games/Xbox360/ISO/Wolfenstein.iso
[size] => 7838695424
[fdate] => 1377249817
[crc32] => 34AE1DE2
[profile] => 5
[link] =>
)
[1] => Array
(
[id] => 272424
[file] => /volume2/Games/Xbox360/wolg.iso
[size] => 42
[fdate] => 1379667986
[crc32] => 34AE1DE2
[profile] => 5
[link] => /volume2/Games/Xbox360/ISO/Wolfenstein.iso
)
[2] => Array
(
[id] => 272422
[file] => /volume2/Games/Xbox360/nesttest.iso
[size] => 31
[fdate] => 1379923105
[crc32] => 34AE1DE2
[profile] => 5
[link] => /volume2/Games/Xbox360/wolg.iso
)
)
I've tried messing about with a number of array sorting functions but can't seem to figure it out, any pointers would be helpful! (ps. I know the above array is already sorted but its just an example)