//Shoping cart example session_start(); //Lets supose $_SESSION['shop_cart'] is the array of shopping cart and $item is the item passed from another script array_push($_SESSION['shop_cart'], $item); //To show the shoping cart just work with the array $_SESSION['shop_cart']; while (list($key, $val) = each($_SESSION['shop_cart'])) { echo "$key => $val\n"; }