Definition and usage
pos()
function returns the value of the current element in the array.
This function is an alias for the current()
function.
Each array has an internal pointer pointing to its "current" element, initially pointing to the first element inserted into the array.
Tip: This function will not move the internal pointer of the array.
Related methods:
- current() - Returns the value of the current element in the array
- end() - Point the inner pointer to the last element in the array and output
- next() - Points the inner pointer to the next element in the array and outputs
- prev() - Point the inner pointer to the previous element in the array and output
- reset() - Points the inner pointer to the first element in the array and outputs
- each() - Returns the key name and key value of the current element and moves the internal pointer forward
grammar
pos ( array )
parameter |
describe |
array
|
Required. Specifies the array to be used. |