<?php

function display($message, $title = false)
{
    if ($title) {
        echo "=========== " . $title . " ============";
    }
    echo "<pre class='text-xs'>";
    print_r($message);
    echo "</pre>";
}

function display_table($data)
{

    echo "<table class='w-100'>";
    foreach ($data[0] as $key => $value) {
        echo "<th>" . $key . "</th>";
    }

    foreach ($data as $key => $row) {

        echo "<tr>";
        foreach ($row as $key => $value) {
            echo "<td>" . $value . "</td>";
        }
        echo "</tr>";
    }

    echo "</table>";
}
