[Phpwm] updating an array

Rob Allen rob at akrabat.com
Thu Oct 19 11:55:32 BST 2006


alan dunn wrote:
> I am simply(!) trying to read through an array comparing the key with a
> string (product code) and where I find a match add the corresponding
> quantity to the existing quantity.
> 
> if($match) {$prodarray[$key1] = $prodarray[$key1] + $qty2; }
> 
> If I echo $prodarray[$key1] immediately after this line I get the
> increased value. But after continuing to cycle through the array the
> changed value is lost.
> 
> I have some recollection of a group discussion about arrays being read
> into memory, or proxy values or some such? Can anyone shed light on how
> I get that value into the array?
> 
> thanks, alan dunn
> 

Can you post the entire loop?

Regards,

Rob...



More information about the Phpwm mailing list