I am wondering for all of you more experienced coders how I would take a value coming from my database, which is stored as a double
(Variables regulartime and overtime)
And then calculate the sum of each of the two columns..
foreach ($result as $row) {
echo '<tr><td>' . $row['username'] . '</td>
<td>' . $row['date'] . '</td>
<td>' . $row['jobnumber'] . '</td>
<td>' . $row['customer'] . '</td>
<td>' . $row['worksite'] . '</td>
<td>' . $row['duties'] . '</td>
<td>' . $row['regulartime'] . '</td>
<td>' . $row['overtime'] . '</td></tr>';
}
Thank you so much for your help.
Tyler
EDIT I want to add a final row at the bottom of the two to display the sums