Instead of having many similar variables, you can store the data as elements in an array.
Each element in the array has its own ID so that it can be easily accessed.
There are three different kind of arrays:
- Numeric array - An array with a numeric ID key
- Associative array - An array where each ID key is associated with a value
- Multidimensional array - An array containing one or more arrays
No comments:
Post a Comment