
<table id="dt-basic-example" class="table table-hover w-100" style="font-size: 11px;">
    <thead class="header bg-primary" style="color: #fff;">
        <tr>
            <th style="font-weight: bold;width: 5px;"></th>            
            <th style="font-weight: bold;">Elements</th>
            <th class="text-right" style="font-weight: bold;">Action</th>
        </tr>
    </thead>

    <tbody>
    <?php
        $i = 0;
        $sql = $conn->prepare("SELECT * FROM `tbl_elements` ORDER BY elemName ASC");
        $sql->execute();
        while($fetch = $sql->fetch()){
        $i++;
    ?>
        <tr>
            <td><?php echo $i; ?></td>
            <td><?php echo $fetch['elemName']; ?></td>
            <td class="cell-icon text-right">
                <a href="gate?b=elmt&e=<?php echo $fetch['elemid'];?>" class="edit_data"><i class="fa fa-edit"></i> Edit</a>|
                <a href="#" data-toggle="modal" data-target="#del<?php echo $fetch['elemid'];?>" style="color: #ab3f3b"><i class="fa fa-trash-o"></i> Delete</span></a>
            </td>
        </tr>
    <?php
        include 'delElem.php';
        }
    ?>
    </tbody>                           
</table>