Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to add the integer values using foreach in php
- $qproducts = '0';
- foreach ($this->cart->getProducts() as $product) {
- $qproducts .= $product['quantity'];
- }
- $this->data['pquantity'] = $qproducts;
- $qproducts = '0';
- foreach ($this->cart->getProducts() as $product) {
- $qproducts += $product['quantity'];
- }
- $this->data['pquantity'] = $qproducts;
- $qproducts = 0;
- foreach ($this->cart->getProducts() as $product) {
- $qproducts += $product['quantity'];
- }
Add Comment
Please, Sign In to add comment