I've got an indexed array with n elements:
Array(
'key1' => 'value1',
'key2' => 'value1',
'key3' => 'value1',
...
'key<i-1>' => 'value<i-1>',
'key<i>' => 'value<i>',
'key<i+1>' => 'value<i+1>',
...
'key<n>' => 'value<n>'
)
How to "cut" (ie: copy + remove) the i_th element so the result array is:
Array(
'key1' => 'value1',
'key2' => 'value1',
'key3' => 'value1',
...
'key<i-1>' => 'value<i-1>',
'key<i+1>' => 'value<i+1>',
...
'key<n>' => 'value<n>'
)
I know the array_pop() and array_shift() PHP functions, but is there a generic one to "cut" an element by its key?
Thank you.