Arrays do not have to be a simple list of keys and values—each location in the array can
hold another array.This way, we can create a two-dimensional array.You can think of a
two dimensional array as a matrix, or grid, with width and height or rows and columns.
If we want to store more than one piece of data about each of Bob’s products, we
could use a two-dimensional array.
Figure 3.3 shows Bob’s products represented as a two-dimensional array with each
row representing an individual product and each column representing a stored product
attribute.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment