<tr> <th>Time In</th> <th>Time Out</th> <th>Time In</th> <th>Time Out</th> <th>Date</th> <th>Paid</th> <th>Job</th> <th>Comment</th> <th> </th> </tr> <?php $totalPaid = 0; foreach ($hoursArray as $hours) { $totalPaid += $hours['paid']; editableRow($hours, $jobsArray); } ?> <tr class="bottom"> <th colspan="5" class="text-right"> Total: </th> <th id="totalPaid" class="paid"> $<?php echo number_format($totalPaid, 2); ?> </td> <th colspan="3"> </th> </td>
</div> <table class="table"> <tr> <th>Time In</th> <th>Time Out</th> <th>Time In</th> <th>Time Out</th> <th>Date</th> <th>Paid</th> <th>Job</th> <th>Comment</th> <th> </th> </tr> <?php for ($x = 0; $x < count($hoursArray[$i]['hours']); $x++) { editableRow($hoursArray[$i]['hours'][$x], $jobArray); } ?> <tr class="bottom"> <th colspan="5" class="text-right"> Total: </th> <th class="paid totalPaid"> $<?php echo number_format($hoursArray[$i]['totalPaid'], 2); ?> </td> <th colspan="2"> </th> <td> <button type="button" title="Add Hours" class="addRowButton btn btn-primary btn-xs"><i class="glyphicon glyphicon-plus"></i></button> </td>
<tr> <th>Name</th> <th>In</th> <th>Out</th> <th>In</th> <th>Out</th> <th>Date</th> <th>Job</th> <th>Comments</th> </tr> </thead> <tbody> <?php for ($i = 0; $i < count($hoursArray); $i++) { $hours = $hoursArray[$i]; editableRow($hours, $jobArray, true); } ?> </tbody> <?php break; case 'user': ?> <thead> <tr> <th>Name</th> <th>Email</th> <th>Total Hours</th> <th>Total Paid</th> </tr> </thead>