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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Goyne wrote:
On Sun, 09 Jan 2005 15:59:43 +0100, M. Sokolewicz <tularis@xxxxxxx> wrote:

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


Why would you ever want to do that other than to waste cycles?
can't recall what it was exactly, but I believe it was a case where I didn't know the key of the array, nor the value, but knew the "place" in the array.
Can't exactly remember what it was... I am now thinking that what I'm saying in my last line can be done easily by using array_values and using a numeric key....


But... as I said, I can't recall what it was. In the end I simply rewrote whatever it was to use a more efficient way of handling things

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux