Figuring out how many elements are in an array
Figuring out how many elements are in an array
| Be careful when using this value in your logic.
The number of elements in an array is a number
counting from one. But when accessing an array, you
must access starting from zero. Thus, the last element
in the array @available_colors is not
$available_colors[@available_colors] but rather
$available_colors[@available_colors - 1]. |
Using List Arrays
Table of Contents
Adding elements to a list array
|