Help with arrays...
Mark Ingram
mark.ingram at nexsan.com
Mon Aug 11 14:05:16 UTC 2003
i basically want to list every version of every product, so i need a
multi-dimensional array?
Product A
Version 1.0
Version 2.0
Product B
Version 1.1
Version 2.1
Product C
Version 1.2
Version 2.2
etc etc.
-----Original Message-----
From: developers-owner at bugzilla.org
[mailto:developers-owner at bugzilla.org]On Behalf Of Mark Ingram
Sent: 11 August 2003 13:24
To: Bugzilla Dev List
Subject: Help with arrays...
Hi,
i need help referencing members of an array in a template. I have the
following code and i cant seem to access what i want:
my %products;
my %versions;
foreach my $p (@enterable_products) {
if (CanEnterProduct($p))
{
$products{$p} = $::proddesc{$p};
$versions{$p} = {"1.0", "2.0", "3.0"};
}
}
$vars->{'proddesc'} = \%products;
$vars->{'versions'} = \%versions;
In the template i have a loop going through each product, which works
fine:
[% FOREACH p = proddesc.keys.sort %]
[% END %]
but i want to try to access the difference versions of each product too, i
have tried
[% actual = proddesc.$p %]
[% FOREACH ver = versions.$actual %]
[% ver %]
[% END %]
and numerous other ways, but to no avail.
Can anyone help me out?
Thanks
Mark Ingram
Software Engineer
Nexsan Technologies
33 - 35 Parker Centre
Mansfield Road
Derby
DE21 4SZ
United Kingdom
p: +44 01332 291600
f: +44 01332 291616
w: http://www.nexsan.com
e: mark.ingram at nexsan.com
The next generation now!
WINNER
Best Enterprise Storage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/developers/attachments/20030811/76b17bde/attachment.html>
More information about the developers
mailing list