예제 #1
0
function printMessageWithBorder($message)
{
    $message = "- " . $message . " -";
    printBorder($message);
    echo $message . "\n";
    printBorder($message);
}
예제 #2
0
function printAsciiTable($result)
{
    $colWidths = getColWidths($result);
    printBorder($colWidths);
    printDataRows($colWidths, [array_keys($result[0])]);
    printBorder($colWidths);
    $dataRows = array_map(function ($item) {
        return array_values($item);
    }, array_values($result));
    printDataRows($colWidths, $dataRows);
    printBorder($colWidths);
}