I have an array with key => value and I want to receive the previous and next entry for a given array key.
Example:
$array = array(
'one' => 'first',
'two' => 'second',
'three' => '3rd',
'four' => '4th'
)
When I have the given key 'two' I want to receive the entries $array['one'] and $array['three'], is there any nice none foreach solution?