NZ_Kiwis;10877911 wrote:Soo
$cart();
$SESSION['cart'];
Would work???
Well, that's not exactly syntactically correct. But you could do:
$cart = array();
$cart[] = array('id' => 1234, 'qty' => 5); // add one item to cart;
$cart[] = array('id' => 4532, 'qty' => 2); // add another item
// now save entire cart in session data:
$_SESSION['cart'] = $cart;