<div class="wrapper">
<div class="container">
    
    <div class="row">
        <div class="col-md-12">
            <div class="panel">
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-responsive table-striped">
                            <thead>
                                <tr>
                                    <?php foreach($fields as $field){?>
                                    <th>
                                        <?php echo $field;?>
                                    </th>
                                    <?php }?>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach($resultset as $row){?>
                                <tr>
                                    <?php foreach ($fields as $field) { ?>
                                    <td><?php echo $row[$field]; ?></td>
                                    <?php } ?>
                                </tr>
                                <?php }?>
                                
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
