2017 © Pedro Peláez
 

library markdown-table

Dynamically generate markdown tables

image

maddhatter/markdown-table

Dynamically generate markdown tables

  • Friday, June 2, 2017
  • by maddhatter
  • Repository
  • 1 Watchers
  • 5 Stars
  • 313 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 159 % Grown

The README.md

Markdown Table

Latest Stable Version Total Downloads Latest Unstable Version License Build Status, (*1)

A small package to dynamically generate Markdown tables, as described here., (*2)

Install

Install using composer:, (*3)

composer require maddhatter/markdown-table

Usage

// create instance of the table builder
$tableBuilder = new \MaddHatter\MarkdownTable\Builder();

// add some data
$tableBuilder
    ->headers(['Tables','Are','Cool']) //headers
    ->align(['L','C','R']) // set column alignment
    ->rows([ // add multiple rows at once
        ['col 1 is', 'left-aligned', '$1600'],
        ['col 2 is', 'centered', '$12'],
    ])
    ->row(['col 3 is', 'right-aligned', '$1']); // add a single row

// display the result
echo $tableBuilder->render();

Result

| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned  | $1600 |
| col 2 is |   centered    |   $12 |
| col 3 is | right-aligned |    $1 |

The Versions

02/06 2017

dev-master

9999999-dev

Dynamically generate markdown tables

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shawn Tunney

02/06 2017

1.0.0

1.0.0.0

Dynamically generate markdown tables

  Sources   Download

MIT

The Requires

 

by Shawn Tunney

01/06 2017

0.0.1

0.0.1.0

Dynamically generate markdown tables

  Sources   Download

MIT

The Requires

 

by Shawn Tunney