Re: [PHP] Help with a foreach statement

2008-05-11 Thread Craige Leeder
Hi Ron, This code should work: $quantity) { echo "" . $product_name . " - " . $quantity . "\r\n"; } ?> Though I'm not sure about $cart[$product_id]. Where is that coming from?. It makes no sense here. Perhaps you want to do a tri-demensional array in $_session, so you will have a

[PHP] Help with a foreach statement

2008-05-11 Thread Ron Piggott
I am writing a shopping cart. Products assigned in the following fashion: $_SESSION['selection'][$product]=$quantity; I am wanting to display the list of products in the shopping cart in a list for the user to see as they continue shopping. I put the SESSION variable into $cart $cart = $_SESSIO