function array_peek($a,$k) { $a=array_keys($a); return (array_search($k,$a)!=count($a)-1?$a[array_search($k,$a)+1]:false); }
That's how I'd do it =]