The current() function is used to fetch the value of the current element in an array.
Every array has an internal pointer to its “current” element, which is initialized to the first element inserted into the array.
Tip: This function does not move the arrays internal pointer.
|array||Required. Specifies the array to use|
$names=array("Samuel","Lachlan","Alex"); echo current($names);