<table id="example" class="table table-bordered table-striped table-sm"> <?php if (isset($rows)) { ?> <thead> <tr> <th colspan="16">Name: <?= $rows[0]['studentname']; ?> RollNo: <?= $rows[0]['rollno']; ?></th> <th colspan="16">Session: <?= getSessionById($sessionid); ?> Class: <?= getClassById($classid) ?> Section: <?= getSectionByID($sectionid); ?> </th> <th></th> </tr> </thead> <tbody> <tr> <th class="text-primary">Month</th> <?php for ($i = 1; $i <= 31; $i++) { ?> <th><?= $i; ?></th> <?php } ?> <td>Total</td> </tr> <?php foreach ($rows as $row) { $l = 0; $a = 0; $t = 0; ?> <tr> <td><?= $row['month']; ?></td> <?php for ($i = 1; $i <= 31; $i++) { $field = 'day' . $i; ?> <td><?= $row[$field] ?></td> <?php switch ($row[$field]) { case "L": $l += 1; break; case "A": $a += 1; break; case "T": $t += 1; break; } ?> <?php } ?> <td><?= "A=" . totalabsentiesM($row['enrollmentid'], 31, $row['month']) . ", L=" . totalleavesM($row['enrollmentid'], 31, $row['month']) . ""; ?></td> </tr> <?php } ?> <tr> <td colspan="32"></td> <td><?= "A=" . totalabsenties($row['enrollmentid'], 31) . ", L=" . totalleaves($row['enrollmentid'], 31) . ""; ?></td> </tr> </tbody> <?php } ?> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)