PHP code example of davidbadura / markdown-builder
1. Go to this page and download the library: Download davidbadura/markdown-builder 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/ */
davidbadura / markdown-builder example snippets
$builder = new MarkdownBuilder();
$builder
->h1('Markdown Builder')
->p('A simple helper class to create markdown.')
->h2('Install ' . $builder->inlineBold('this') . ' powerfull library')
->code("composer ilder->getMarkdown();
echo (new MarkdownBuilder())->h1('Hello World')->getMarkdown();
echo (new MarkdownBuilder())->h2('Hello second world')->getMarkdown();
echo (new MarkdownBuilder())->h3('My name is...')->getMarkdown();
echo (new MarkdownBuilder())->p('paragraph')->getMarkdown();
echo (new MarkdownBuilder())->blockquote("Foo\nBar\nBaz")->getMarkdown();
echo (new MarkdownBuilder())->bulletedList(['Foo', 'Bar', 'Baz'])->getMarkdown();
echo (new MarkdownBuilder())->numberedList(['Foo', 'Bar', 'Baz'])->getMarkdown();
echo (new MarkdownBuilder())->hr()->getMarkdown();
echo (new MarkdownBuilder())->code('$var = "test";', 'php')->getMarkdown();