Responsive Html Table Using Footable

FooTable : How To Create Responsive Html Table Using FooTable


In this FooTable Tutorial we will see How To Create a Responsive Html Table To Display friendly In Desktop , Tablet And Mobile  Using FooTable .

I Use In This Tutorial:
- FooTable.
- Php.
- NetBeans IDE .
- PhpMyAdmin .

Source Code:

<!-- php code to get data from mysql database -->


$hostname = "localhost";
$username = "root";
$password = "";
$databaseName = "test_db";

$connect = mysqli_connect($hostname, $username, $password, $databaseName);
$query = "SELECT * FROM `users";
$result = mysqli_query($connect, $query);


<!DOCTYPE html>
        <title> Responsive Html Table Using FooTable </title>
        <link rel="stylesheet" href="css/footable.core.css"> 
        <link rel="stylesheet" href="css/footable.metro.css">
        <script src="js/jquery-1.11.3.min.js"></script>
        <script src="js/footable.js"></script>

        <!-- toggle-arrow-alt = icon name -->
        <!-- add toggle-medium for a medium size -->
        <!-- add toggle-large for a large size -->
        <table class="footable toggle-arrow-alt">
            <!-- data-toggle = where the toggle icon will appear -->
<th data-toggle="true">ID</th>
                        <!-- hide this column in tablet and mobile -->
<th data-hide="tablet,phone">First Name</th>
                        <!-- hide this column in mobile devices -->
<th data-hide="phone">Last Name</th>

            <!-- populate table from mysql database -->
            <?php while($row1 = mysqli_fetch_array($result)):;?>
                <td><?php echo $row1[0];?></td>
                <td><?php echo $row1[1];?></td>
                <td><?php echo $row1[2];?></td>
                <td><?php echo $row1[3];?></td>
            <?php endwhile;?>

    <script type="text/javascript">


responsive html table in tablet
In Tablet

responsive html table in mobile
In Phone

See more Icon Styles

Share this

Related Posts

Next Post »