<?php $class = $db->getRows("select * from class");
    print_r($class);
?>

<button class="btn btn-primary">Nur, LKG, UKG</button>

<button class="btn btn-primary">I to IV</button>

<button class="btn btn-primary">V to VIII</button>

<button class="btn btn-primary">IX to XII</button>

<table class="table" cellspacing="0" cellpadding="0" border="1" id="tblData">

    <thead>
        <tr>
            <th>S.No</th>
            <th>idno</th>
            <th>Class</th>
            <th>i1</th>
            <th>i2</th>
            <th>i3</th>
            <th>i4</th>
            <th>i5</th>
            <th>i6</th>
            <th>i7</th>
            <th>i8</th>
            <th>i9</th>
            <th>i10</th>
            <th>i11</th>
            <th>i12</th>
        </tr>
    </thead>
    <tbody>
        <?php 
        $allstudents = $db->getRows("select * from installment where session='".$_SESSION["admin"]["session"]."' ");
            foreach($allstudents as $stu){ $i++; ?>
            <tr>
                <td><?php echo $i; ?></td>
                <td><?php echo $stu['idno']; ?></td>
                <td><?php echo $stu['class']; ?></td>
                <td><?php echo $stu['i1']; ?></td>
                <td><?php echo $stu['i2']; ?></td>
                <td><?php echo $stu['i3']; ?></td>
                <td><?php echo $stu['i4']; ?></td>
                <td><?php echo $stu['i5']; ?></td>
                <td><?php echo $stu['i6']; ?></td>
                <td><?php echo $stu['i7']; ?></td>
                <td><?php echo $stu['i8']; ?></td>
                <td><?php echo $stu['i9']; ?></td>
                <td><?php echo $stu['i10']; ?></td>
                <td><?php echo $stu['i11']; ?></td>
                <td><?php echo $stu['i12']; ?></td>
            </tr>
    <?php } ?>
    </tbody>

</table>