phpyurta/cli-table

v1.0.1 2024-09-16 04:31 UTC

This package is auto-updated.

Last update: 2025-08-16 07:02:08 UTC


README

Installation

composer require phpyurta/cli-table

Using

<?php

require_once __DIR__ . '/vendor/autoload.php';

use PHPYurta\CLI\CLITable;

(new CLITable())
    ->setCaption('Default table ')
    ->addHeader('~-(^._.^)')
    ->addHeader('Lifespan')
    ->addHeader('Origin')
    ->addHeader('Other names')
    ->addRow()
        ->addCell('Maine Coon')
        ->addCell('13 – 14 years')
        ->addCell('Maine, United States')
        ->addCell('Coon Cat, Maine Cat, Maine Shag')
    ->addRow()
        ->addCell('Persian cat')
        ->addCell('12 – 17 years')
        ->addCell('Iran, Afghanistan')
        ->addCell('Persian Longhair, Shirazi')
    ->addRow()
        ->addCell('Bengal cat')
        ->addCell('12 – 16 years')
        ->addCell('United States')
        ->addCell('I do not know :)')
    ->printOut()
;