Sum values in foreach loop in [php]
<p>I want to sum <code>tot_Price</code> and <code>unit_Price</code> respectively so that I can analyze the average of these two attributes.</p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;{{ $X_land-&gt;house_Type }}&lt;/td&gt;
    &lt;td class="address"&gt;{{ $X_land-&gt;the_Location }}&lt;/td&gt;
    &lt;td&gt;{{ $X_land-&gt;tot_Price }}&lt;/td&gt;
    &lt;td&gt;{{ $X_land-&gt;tran_Area }}&lt;/td&gt;
    &lt;td&gt;{{ $X_land-&gt;unit_Price }}&lt;/td&gt;
    &lt;td&gt;&lt;button id="opener&lt;?php echo $opencount?&gt;"&gt;詳細資訊&lt;/button&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>How should I do this?<br>
Thanks.</p>