Definition :
In PHP array functions pos( ) function is used to fetch the value of the current element in an array. The PHP pos( ) function is an alias of current( ) function.
This function is an alias of the current() function.
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.
Related methods:
pos(array)
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Example : Given below example output the value of current element of an array.
Output : Web