[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: double dim'd arrays
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 15 Jul 2011 15:56:03 +0200
On Fri, Jul 15, 2011 at 3:51 PM, Dave Collins
<Dave.Collins@mercatustechnologies.com> wrote:
> I've got an array of rotating adverts, each one has a lineup of ads it will go through. So I made a double-dimensioned array.
Why not just use a true two-dimensioned array?
local ad_lineup ={}
ad_lineup[1] ={}
ad_lineup[1][1] = "CoolWhip"
ad_lineup[1][2] = "ShreddedWheat"
...
ad_lineup[2] ={}
ad_lineup[2][1] = "ShreddedWheat"
ad_lineup[2][2] = "Swiffer"
...
That would be easier to work with, I think
steve d.