title: multiple column sum in codeigniter table
body: <p>In my view file i am generating a table as following </p>
  
  <pre><code>&lt;?php
  foreach ($accounts as $row) {
    echo '&lt;tr&gt;';
    echo '&lt;td&gt;' . $row['id'] . '&lt;/td&gt;';
    echo '&lt;td&gt;' . $row['total_online_sale'] . '&lt;/td&gt;';
    echo '&lt;td&gt;' . $row['product_price'] . '&lt;/td&gt;';
    echo '&lt;td&gt;' . $row['discount'] . '&lt;/td&gt;';
  }
  ?&gt;
  </code></pre>
  
  <p>I want to generate sum values of those columns in a row surrounded by <code>&lt;tfoot&gt;</code> tag.
  I don't want to do this operations in model. how should I do it?</p>