For example i have an array with the element of following
$array = array(
1 => "a",
3 => "c",
4 => "d",
6 => "f",
);
how could i get next key from given key, if I'm using some function like
get_next_key_array($array,1);
it should return 3.
if it be
get_next_key_array($array,4);
it should return 6.
Is it can be done, I know that next(),current(),prev() in php, but i don't know how to implement my required result using default functions. Please help me.