Re: How do I start at a specific position in an array? Is there

From: Date: Sun, 09 Jan 2005 14:59:43 +0000
Subject: Re: How do I start at a specific position in an array? Is there
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-205903@lists.php.net to get a copy of this message
Tr wrote:
Brent Clements wrote / napísal (a):
I know this is a simple question because I could easily write a loop to move to the specific position in the array, but I want to know is there a function to move the array pointer position to a specific position in the array? Thanks, Brent
next($array) prev($array) current($array) trobi that's not a SPECIFIC place in the array, that's just current, next and previous. AFAIK there is no way to explicitly set the internal pointer of the array to a spcified place. I used a function which basically looped trough the array until it got to the correct depth, and then returned it by reference....but it's not very efficient :S


« previous php.general (#205903) next »