in reply to Re: Ludicrously Stupid Foreach Loop Question
in thread Ludicrously Stupid Foreach Loop Question
You don't need to check it exists:if (exists($stock{$name})) { $stock{$name} += $stock; $shown{$name} += $shown; } else { $stock{$name} = $stock; $shown{$name} = $shown; }
will do.$stock{$name} += ($stock + $shown);
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ludicrously Stupid Foreach Loop Question
by pjf (Curate) on Oct 09, 2001 at 09:55 UTC |