Re: [PHP-DEV] Re: array_seek function

2010-03-16 Thread Hannes Magnusson
On Tue, Mar 16, 2010 at 17:12, Mikko Koppanen wrote: > On Tue, Mar 16, 2010 at 2:12 PM, Christian Schneider > wrote >> I thinks the user space implementation >> >> function array_seek($array, $pos) >> { >>        $a = array_values($array); >>        return $a[$pos]; >> } >> >> is simple enough to

Re: [PHP-DEV] Re: array_seek function

2010-03-16 Thread Mikko Koppanen
On Tue, Mar 16, 2010 at 2:12 PM, Christian Schneider wrote > I thinks the user space implementation > > function array_seek($array, $pos) > { >        $a = array_values($array); >        return $a[$pos]; > } > > is simple enough to not add a native function for this. > > It might not be the most e

[PHP-DEV] Re: array_seek function

2010-03-16 Thread Christian Schneider
Felix De Vliegher wrote: > Hi all > > I recently needed seek functionality in arrays, and couldn't find it > in the regular set of array functions, so I wrote a function for it. > Seek = getting an array value based on the position (or offset, if you > want to call it like that), and not the key o