Hi: > $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? $input = array(3, 'bar', 'baz'); echo $input[2]; // returns 'baz' echo $input[0]; // returns 3 echo $input[5]; // returns NULL, Notice: Undefined offset: 5 --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php