I have an array which may contain numeric or associative keys, or both:\[code\]$x = array('a', 'b', 'c', 'foo' => 'bar', 'd', 'e');print_r($x);/*( [0] => a [1] => b [2] => c [foo] => bar [3] => d [4] => e)*/\[/code\]I want to be able to remove an item from the array, renumbering the non-associative keys to keep them sequential:\[code\]$x = remove($x, "c");print_r($x);/* desired output [0] => a [1] => b [foo] => bar [2] => d [3] => e)*/\[/code\]Finding the right element to remove is no issue, it's the keys that are the problem. \[code\]unset\[/code\] doesn't renumber the keys, and \[code\]array_splice\[/code\] works on an offset, rather than a key (ie: take $x from the first example, \[code\]array_splice($x, 3, 1)\[/code\] would remove the "bar" element rather than the "d" element).