Re: Dazed and Confused

From: Date: Wed, 30 Oct 2002 18:47:14 +0000
Subject: Re: Dazed and Confused
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122086@lists.php.net to get a copy of this message
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

« previous php.general (#122086) next »