$_SESSION[$productID]
If you want to use a variable, don't insist on turning it into a string.
OR to use the array idea and
$_SESSION['productID'][] = $productID;
to add a product ID to the array stored in $_SESSION['productID'].
Better yet; base it on what you would do in real life - a system that has been refined over thousands of years of commerce.
$_SESSION['cart']
would be an array of products in the cart. $_SESSION['cart'][0], $SESSION['cart'][1], $SESSION['cart'][2], and so on. Each product is representd by an array, with ['productID'] storing the product ID, ['quantity'] storing the quantity, and so on for whatever else needs to be stored.
Then $SESSION['cart'][4]['productID'] would be the product ID of the 4th item in the cart; $SESSION['cart'][4]['quantity'] would count how many of that item are stored, and so on.