title: How to increase Items Quantity in Cart
body: <p>I want to increase the quantity of product when i click on add to cart multiple time but i does not increase its quantity remain same, someone help me to solve this problem. what do i code in blank else section</p>
  
  <pre><code>if(isset($_POST["submit1"]))
  {
      if(isset($_SESSION["shopping_cart"]))
      {
          $item_array_id = array_column($_SESSION["shopping_cart"], "item_id");
          if(!in_array($_GET["product_id"], $item_array_id))
          {
              $count = count($_SESSION["shopping_cart"]);
              $item_array = array(
                  'item_id'           =&gt;  $_GET["product_id"],
                  'item_name'         =&gt;  $_POST["hidden_name"],
                  'item_price'        =&gt;  $_POST["hidden_price"],
                  'item_quantity'     =&gt;  $_POST["quantity"],
                 'item_image'     =&gt;  $_POST["hidden_image"],
  
              );
              $_SESSION["shopping_cart"][$count] = $item_array;
          }
          else
          {
  
  
  
  
          }
      }
      else
      {
          $item_array = array(
              'item_id'           =&gt;  $_GET["product_id"],
              'item_name'         =&gt;  $_POST["hidden_name"],
              'item_price'        =&gt;  $_POST["hidden_price"],
              'item_quantity'     =&gt;  $_POST["quantity"],
              'item_image'        =&gt;  $_POST["hidden_image"],
  
          );
          $_SESSION["shopping_cart"][0] = $item_array;
      }     
  }
  </code></pre>