Difference between revisions of "PHP/arrays/pointer"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PHP‎ | arrays
Jump to: navigation, search
(Created page with "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...")
 
(No difference)

Latest revision as of 21:07, 28 November 2019

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