Array index - getting element by a number or string
Posted: Thu Mar 04, 2010 8:02 pm
I think I know the answer but I just would like confirmation. It is clear that you can't access an array value numerically if it is indexed with a string. However In the documentation it says there is a way to access "elements" in the array by looping or repeating using the key word "element".
I have an array that is indexed by strings:
This doesn't work:
I just want to make sure it isn't possible to access array elements numerically in any way at all before I go with the numbered index... numbers are probably better anyway.
I have an array that is indexed by strings:
Code: Select all
theArray["head]["static_values"]
theArray["head]["styles"]
theArray["head]["animated_values"]
Code: Select all
put element 2 of theArray["heads"]