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
Keep It Simple, Stupid (KISS) - the best kiss you'll get in code.
The following PHP constructs were mentioned in the code examples: