On Wed, 30 Oct 2002, PHP List wrote: > So are you saying there really is no array pointer? > Lets say I have an array with several different values like: > $myarray["a"] = "s"; > $myarray[3] = "d"; > $myarray["sdf"] = "y"; > There is no way of saying give me the value in the array at position 2? > Since the size of the array is returned as 3, should there not be a way of > doing this?
There is an array pointer. It is manipulated using the various iteration functions. reset($myarray); echo next($myarray); would give you the value at the second position. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php