|XP is just a number|
Re^3: Determine largest key in hashby MidLifeXis (Monsignor)
|on Oct 04, 2011 at 17:56 UTC||Need Help??|
Ok, Given that use, I would probably do either a sparse array, or a *cringe* hash with numeric keys. Please note that your data under each first level key is not correct...
You would access this stuff then with....
See Re: Determine largest key in hash for details on how to push data into the trigger list.
As a sparse array, this would look like...
You would change your loop to...
I still have a little bit of a cringe-factor with the layout of the sparse array, and would probably reevaluate the control logic around that, but this shows a couple of ways where the structure can make quite a difference in how you manage your data.