title: How to store shopping cart items by unique ID in $_SESSIONS?
body: <p>I am developing a Shopping cart application and I am needing help about storing cart items using $_SESSION.</p>
  
  <p><strong>The Concept</strong></p>
  
  <p>When user clicks on Add to Cart, the following information is stored: Product ID e.g. 5312, Product Name, Product Quantity, Product Rules (e.g. color : white, size : medium and so on)</p>
  
  <p><strong>The problem</strong></p>
  
  <p>The problem is that when I save the entry in $_SESSION by item ID. I want to assume the following:</p>
  
  <ul>
  <li>User adds 1 item of product #11 which color is white </li>
  <li>User then adds 2    items of product #11 which color is blue</li>
  </ul>
  
  <p>If I save by item ID, the info will be overridden always, I want to make each call / each add to cart unique because I am assuming he may add different sizes, different colors of the same product.</p>
  
  <p>How can I come over such a problem?</p>
  
  <p>Any ideas or inputs are greatly appreciated.</p>