$date = $myarr[$index][$subindex];
where $date is a reference to an array of ten integers and ($index, $subindex) is a pair of integers each in range 0..99.
With your data, you cannot assume that $index, $subindex, or the pair ($index, $subindex) are unique. The best solution very much depends on how you need to handle these special cases. I would only be adding to your confusion if I attempted to answer your original question before you clarify this issue.
The use of an array-of-arrays, as the reference above requires, has another problem. The arrays are very sparse. Refering to your data, the entire structure only stores fifteen dates. This is not a serious problem yet, but it would not scale up well if your array size were to increase. We seldom use hashes with integer keys, but it seems to be the perfect solution to this problem.
In reply to Re: Adding cols to 3d arrays - syntax
by BillKSmith
in thread Adding cols to 3d arrays - syntax
by peterrowse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |