How Values in Arrays Are Indexed

Q

How Values in Arrays Are Indexed? - PHP Script Tips - Understanding PHP Arrays and Their Basic Operations

✍: FYIcenter.com

A

Values in an array are all indexed their corresponding keys. Because we can use either an integer or a string as a key in an array, we can divide arrays into 3 categories:

  • Numerical Array - All keys are sequential integers.
  • Associative Array - All keys are strings.
  • Mixed Array - Some keys are integers, some keys are strings.

2007-04-20, 4694👍, 0💬