I have an array with specific keys:
array(
420 => array(...),
430 => array(...),
555 => array(...)
)
In my application I know current key (for example 555
). And I want to get the previous array element. In this example it is array element with key 430
. How can I do this in PHP? I tried to work with prev()
, but for this function we should know current array element. I didn't find function, what set the current array element.