PHP code example of norman-huth / markdown

1. Go to this page and download the library: Download norman-huth/markdown library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

norman-huth / markdown example snippets


use NormanHuth\Markdown\Table;

$table = new Table();

$table->addCell('ID');
$table->addCell('Name');

$table->addRow([1, 'John Doe']);
$table->addRow([2, 'Johanna Doe']);

echo $table->render();

use NormanHuth\Markdown\Table;

$table = new Table();

$table->addCell('ID');
$table->addCell('Name');

$table->addRows(
    [
        [1, 'John Doe'],
        [2, 'Johanna Doe'],
    ]
);

echo $table->render();

use NormanHuth\Markdown\Table;

$table = new Table();
$table->addCell('ID');
$table->addCell('Name');
$table->addRows(\App\Models\User::all(['id', 'name']));

return $table->render();