Index of a field

If the „Index of the field in the array“ is given, does the first field have index 0, second field index 2, third index 4 and so on, like in the example, or how are they numbered?

Assuming you are referring to the content of $a2 in Assignment 4.2 then no index does not mean 0,2,4,… but 0,1,2,…

1 Like

just want to make sure of it…
so the index should always be less than the array length, right?

if I have an array with 11 elements, then the index should be 0,1,2,3…10
if the index is 11 then it is not valid…


1 Like