Working in PHP, assume you have an associative array:
'Monday' => 'mon'
'Tuesday' => 'tue'
'Wednesday' => 'wed'
'Thursday' => 'thur'
'Friday' => 'fri'
'Saturday' => 'sat'
'Sunday' => 'sun'
How could you perform a “circular” array shift? Say shifting things so that the array starts with Wednesday, and proceeds through all 7 days, ending with Tuesday?
An important note: I need to do this by key, as I have other code determining what day the shift needs to start at.
No looping required