The What
Description
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.
The current
function fetches the “current” element, i.e. the one that the internal pointer is pointing at within the array.
Parameters
array_variable
- The array to be worked on.
Return Values
Returns the value of the current element.
Show It in ActionBasic
Don’t repeat yourself. Don’t repeat yourself. Don’t repeat yourself.
Go DeepPro
Also See
The following PHP constructs were mentioned in the code examples: