I'm building a shopping cart php file that will query a database for products (and the quantity of each product a user adds to the shopping cart). But I'm having trouble understanding what to do with a "comma-delimited string". Here's the loop in my code so far:
//Loop through your cart array (foreach productID's quantity in cart):
$_SESSION['numItems'] = $cart;//Update the number of items in your cart
//Build a comma-delimited string in $prodIDStr containing the product
//ID’s of the products currently in our cart array:
$prodIDStr = "";//STACKOVERFLOW QUESTION
if($_SESSION[numItems] = 0){//If cart it empty:
print "<h3>Your shopping cart is empty!</h3>\n";
}
Else{//if cart is not empty:
//remove trailing comma from $prodIDstr:
What exactly is a comma-delimited string, and what does removing a trailing comma do?