Within PHP, an array has an internal pointer, which provides a mechanism for other functions to interact and traverse (move) through the array. This internal pointer points to its “current” element. When an array is first initialized (created), the internal pointer is set to the first element of the array.
current function fetches the “current” element, i.e. the one that the internal pointer is pointing at within the array.
- The array to be worked on.
Returns the value of the current element.
Show It in ActionBasic
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
The following PHP constructs were mentioned in the code examples: