how to add the integer values using foreach in php
<p>I just want to know the syntax of adding the quantity using <code>foreach</code>.
Any help is greatly appreciable.</p>

<p>Here is the code what I do so far:</p>

<pre><code>$qproducts = '0';
foreach ($this-&gt;cart-&gt;getProducts() as $product) {  
    $qproducts .= $product['quantity'];
}       
$this-&gt;data['pquantity'] = $qproducts;
</code></pre>
