PHP code example of jbzoo / markdown
1. Go to this page and download the library: Download jbzoo/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/ */
jbzoo / markdown example snippets
declare(strict_types=1);
use JBZoo\Markdown\Table;
echo (new Table())
->addAutoIndex('Index', 999)
->setHeaders(['Header #1', 'Header #2'])
->setAlignments([Table::ALIGN_CENTER, Table::ALIGN_RIGHT])
->appendRow(['123', '456'])
->appendRows([
['789_1', '9871'],
['789_2', '']
])
->render();
declare(strict_types=1);
use JBZoo\Markdown\Markdown;
// Page Navigation
Markdown::title('Page Name', 1)); // # Page Name\n
Markdown::title('Title', 2)); // ## Title\n
Markdown::title('Sub Title', 3)); // ### Sub Title\n
// [Google](https://google.com)
Markdown::url('Google', 'https://google.com');
// [](https://travis-ci.org/Status)
Markdown::badge('Status', 'https://travis-ci.org/', 'https://travis-ci.org/Status');
// 
Markdown::image('https://google.com/example.jpg', 'Logo');
// > Quote LIne 1
// > Quote LIne 2
// > Quote LIne 3
Markdown::blockquote(["Quote LIne 1\nQuote LIne 2\nQuote LIne 3"]);
Markdown::blockquote(['Quote LIne 1', 'Quote LIne 2', 'Quote LIne 3'])
// <details>
// <summary>Quote Text</summary>
//
// Some hidden text
//
// </details>
Markdown::spoiler('Quote Text', 'Some hidden text');
//
Markdown::code("\necho 1;\n", 'php');