Hey again all, right I've tried using an associative array for my shopping
cart and I've encountered two problems - so far.  The first problem is that
I can't only add one item to the cart and the second problem is that when
viewing the cart it shows two items in it.  I think this is because there
are two parts to the array, "buy" and "quantity" and when I'm counting the
amount of items in the array its counting all the components of the array.

How can I add items to the end of this associative array?  Some of the code
I'm using is below.  I'm also thinking that if the below code works then
there is something wrong with the way I'm reading back the items in the
cart.  Ugh I dunno!

Any ideas?


Graeme :)




if($buy != "")


$shoppingcart = array( 'buy'=>'$buy', 'quantity'=>'$quantity' );



PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to