如何通过"order"键的值对此数组进行排序?尽管这些值目前是连续的,但它们并不总是如此.
Array
(
[0] => Array
(
[hashtag] => a7e87329b5eab8578f4f1098a152d6f4
[title] => Flower
[order] => 3
)
[1] => Array
(
[hashtag] => b24ce0cd392a5b0b8dedc66c25213594
[title] => Free
[order] => 2
)
[2] => Array
(
[hashtag] => e7d31fc0602fb2ede144d18cdffd816b
[title] => Ready
[order] => 1
)
)
Run Code Online (Sandbox Code Playgroud) 我有这组数组:
Array(
[day_1] => Array(
[3744] => Array(
[time_start] => 11:00
[time_end] => 12:00
[notes] =>
)
[3746] => Array(
[time_start] => 08:00
[time_end] => 11:00
[notes] =>
)
[532] => Array(
[time_start] => 09:00
[time_end] => 11:30
[notes] =>
)
)
[day_2] => Array(
[3747] => Array(
[time_start] => 08:00
[time_end] => 10:00
[notes] =>
)
)
)
Run Code Online (Sandbox Code Playgroud)
如何根据“time_start”的值对“day_1”中的数组进行排序?
我想要达到的最终结果是:
Array(
[day_1] => Array(
[3746] => Array(
[time_start] => 08:00
[time_end] => 11:00
[notes] =>
)
[532] => Array( …Run Code Online (Sandbox Code Playgroud)