title: Update cart quantity only updating one product
body: <p>I am trying to use a single button to update all my cart quantity and it's not working</p>
  
  <p>I have added the product to cart via sessions, display products from cart now all I'm trying to do is to update the quantity and it's not updating</p>
  
  <pre><code>if(isset($_POST["updates"])) { 
      if(isset($_SESSION["shopping_cart"])) {
  
          $pid=$_POST['proid'];
          $qty =$_POST['quantity'];
  
          foreach ($_SESSION['shopping_cart'] as $key =&gt; $value) {
              if ($value['item_id'] == $_POST['proid']) {
  
                  $_SESSION['shopping_cart'][$key]['item_qty'] = $_POST['quantity'];
              }
          } 
  
           $_SESSION['shopping_cart'] = array_values($_SESSION['shopping_cart']);
  
           header('Refresh:0');
      }
  }
  </code></pre>
  
  <p>@RiggsFolly here is the print result </p>
  
  <pre><code>Array ( 
      [0] =&gt; Array ( 
              [item_id] =&gt; 24 
              [item_name] =&gt; something 
              [item_price] =&gt; 800 
              [item_qty] =&gt; 1 
          ) 
      [1] =&gt; Array ( 
              [item_id] =&gt; 26 
              [item_name] =&gt; Fishly 
              [item_price] =&gt; 450 
              [item_qty] =&gt;
          ) 
  ) 
  </code></pre>