PHP/arrays/pointer
Jump to navigation
Jump to search
Arrays have an internal pointer for serial access. Most functions don't use it, but there are a number which do, or which are related to the order of elements.
There are also functions which remove, add, or rotate elements; those should probably be documented here as well.
pointer
- current(): return the current element
- end(): point the internal pointer at the last element
- key(): return the index element of the current array position
- next(): advance the internal pointer by one element
- prev(): move the internal pointer back by one element
- reset(): point the internal pointer at the first element
order only
- array_key_first(): gets the first key of an array
- array_key_last(): gets the last key of an array