Forum Moderators: coopster
$product = array("ID"=>$id1, "name"=> $name1, "colour"=>$colour1, "quantity"=>$quantity1, "size"=>$size1, "price"=>$price1);
$cart[$pos] = $product;
I want to be able to delete an item from the cart but can't find any good way to do it.
One way I consider is using the unset function but then one position will be empty unless i restructure the array manually.
THis must be a common task to delete from carts so what is a good way to do it?
What about using array_splice [php.net]?
I am not 100% sure of the syntax but look carefully at the comments. It looks like it may work.