On Wed, 17 Mar 2010, Daniel Convissor wrote: > > $input = array(3, 'bar', 'baz'); > > echo array_seek($input, 2); // returns 'baz' > > echo array_seek($input, 0); // returns 3 > > echo array_seek($input, 5); // returns NULL, emits an out of range warning > > Why waste time calling a function when this can be done right now by > acting on the array itself?
Because array keys can be sparse and don't have to be "in order". regards, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php