配列を数値で並べ替えたい、つまり188、188-1、188-2、222、222-1、222、-2など。これが現在の配列の外観です。
[188-1] => Array
(
[time] => 1
)
[188-2] => Array
(
[time] => 2
)
[188-3] => Array
(
[time] => 3
)
[188] => Array
(
[notes] => frog stand notes
)
[489] => Array
(
[notes] => notes
)
[489-1] => Array
(
[weight] => 10
[reps] => 30
)
[489-2] => Array
(
[weight] => 20
[reps] => 30
)
[489-3] => Array
(
[weight] => 30
[reps] => 30
)
[492-1] => Array
(
[weight] => 500
[distance] => 100000
)
[492] => Array
(
[notes] => more notes
)
ksortを試しましたksort($sorted, SORT_DESC);
が、何か間違ったことをしない限り、ハイフンでつながれたキーではうまく機能しませんか?