[Phpwm] updating an array

alan dunn alan at dunns.co.uk
Thu Oct 19 11:35:56 BST 2006


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



More information about the Phpwm mailing list