PHP3 Manual
PrevNext

current

current -- return the current element in an array

Description

mixed current(array array);

Each array variable has an internal pointer that points to one of its elements. In addition, all of the elements in the array are linked by a bidirectional linked list for traversing purposes. The internal pointer points to the first element that was inserted to the array until you run one of the functions that modify that pointer on that array.

The current() function simply returns the array element that's currently being pointed by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list, current() returns false.

See also: end(), next(), prev() and reset().


PrevHomeNext
countUpeach