我有以下数组:
[
[
'schedules' => [
'monday' => 1,
'tuesday' => 1,
'wednesday' => 1,
'thursday' => 1,
'friday' => 1,
'saturday' => 0,
'sunday' => 1,
]
]
]
我想旋转这个数组的元素,第一个键是明天。假设今天是星期三,我希望我的数组看起来像这样:
[
[
'schedules' => [
'thursday' => 1,
'friday' => 1,
'saturday' => 0,
'sunday' => 1,
'monday' => 1,
'tuesday' => 1,
'wednesday' => 1,
]
]
]
我已经有可用的工作日(例如字符串'thursday')。它被传递到我正在使用的函数中。