note 1904 modified in function.array by irc-html

From: Date: Sat, 19 Jan 2002 20:52:02 +0000
Subject: note 1904 modified in function.array by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25424@lists.php.net to get a copy of this message
Every array has an "internal pointer". When you create an array, the internal pointer is automatically set to point at the first member. You can print the current location of the pointer: $bob= current($myarrayname); echo "$bob"; You can advance the pointer to the next spot using next($myarrayname). To see a particular member of an array, set a $variable= $myarrayname[2] where "2" is the number of the member you want to use. When assigning members to an array, the members are numbered beginning with 0, rather than 1. --was-- Every array has an "internal pointer". When you create an array, the internal pointer is automatically set to point at the first member. You can print the current location of the pointer: <pre> $bob= current($myarrayname); echo "$bob"; </pre> You can advance the pointer to the next spot using next($myarrayname). To see a particular member of an array, set a $variable= $myarrayname[2] where "2" is the number of the member you want to use. When assigning members to an array, the members are numbered beginning with 0, rather than 1. http://www.php.net/manual/en/function.array.php

« previous php.notes (#25424) next »