how to sum all td values ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: how to sum all td values ? (/showthread.php?tid=71921) |
how to sum all td values ? - kvanaraj - 10-11-2018 Code: <td><?php echo $row['remun'];?></td> Code: for example Code: <input type="text" name="grand_total" id="grand_total" /> Code: <script> RE: how to sum all td values ? - Pertti - 10-11-2018 That's because you are assigning individual value to the field, not sum. Haven't tested it, but something like this should work: Code: <script> Out of curiosity, why are you not doing that on PHP side? RE: how to sum all td values ? - php_rocs - 10-11-2018 @kvanaraj, Why don't you let the database do the heavy lifting and just send the final values and total to the view? |