I'm new here and also new in PHP.
I'm using session variables to create a simple shopping cart.
I would like the variables to contain product name, product quantity and product prize.
currently I only know how to create a single variable, i do it like this:
Code: Select all
if (isset($_GETї'product'])) {
if (!empty($_SESSIONї'product'])) {
$products = array_unique(array_merge(unserialize($_SESSIONї'product']),$_GETї'product']));
$_SESSIONї'product'] = serialize($products);
}
}Thanks in advance.