Tom , thanks for you analysis for me.
>I hope you're keeping your product data and prices in a database, with
>this merely being example code.
Dear Tom , yes you are correct. i am playing it for the test. the
final one will keep in mysql db.
the whole working code is picup from
http://search.cpa
now i figure out a way to push new value which is not originally
existed in the array at the end of loop.
my $idx = 0;
for my $product ( @{$cart} ) {
$idx= ($idx+1); $idxx=($idx-1);
$product->{itemID} == $itemID or next;
$finalidx=$idx;
For Determine whether a hash value exists, i googled the internet. and
found
print "Value EXISTS, but may be undefined.\n" if exists
$hash{ $key };
so i have a test by below code while it seems i can not get the
expeacted result. (all result is value is non existed.)
print "Value EXISTS, but m
On 10/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> i am using cgi session to write a cart .
> here is the partial code.
If you only send part of your code, ideally you should send a part
which can run on its own. That is, make a small stand-alone program
which shows the problem you're hav
i am using cgi session to write a cart .
here is the partial code.
the problem is for loop will push mutiply times of same value if
itemID is not exit in original array.
what i want isonly push one times of value if itemid is a new
value
could any one here give some clue or show me the co