About the current() function:
Each array has an internal pointer pointing to its "current" unit, which initially points to the first unit inserted into the array. Get it with current().
Similar functions:
end() Moves the array's internal pointer to the last cell and returns its value.
next() returns the value of the next cell pointed to by the array's internal pointer, or FALSE when there are no more cells.
prev() returns the value of the previous cell pointed to by the internal pointer of the array, or returns FALSE when there are no more cells.
reset() Rewinds the internal pointer of array to the first cell and returns the value of the first array cell, or FALSE if the array is empty.
Look at the following PHP case: