Hi
I am struggling a bit trying to work out the best way to dynamically store some info then access it.
(Note: I read the data in so can't statically initialise the array, some .Add() is needed)
I have two classed of data with variable columns count
Type A
Name, Token1, token2, ... repeating
Type B
NameX, Info1, Info2, TokenA, TokenB, ...
What I would like to do is :
- Add a row of Type A data to the Type A array with a key of "Name"
- Add a row of Type B data to the Type B array with a key of "NameX"
Then access the respective arrays with the appropriate Name key and get the "object" which has the data
Then from the data get the various tokens and info. This can be by $x[0], $x[1] type of references but would be nice if
I could do $x["Info1"], $x["info2"] and foreach $x["token*"] <= i.e. each token
>> After some tips ?
(seems like I need a hash table to an array but I can't seem to get this right)
I hope I have explained this clearly enough.
Thanks in advance
- Edited by Greg B Roberts 23 hours 47 minutes ago