PHP code example of dikki / markdown
1. Go to this page and download the library: Download dikki/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/ */
dikki / markdown example snippets
use Dikki\Markdown\MarkdownParser;
. '/contents/'
);
$output = $parser->getFileContent("sample-post");
echo "<pre>";
print_r($output);
$string = "<h1>Heading 1 Here</h1>";
$md = (new \Dikki\Markdown\HtmlToMdConverter())->convert($string);
echo $md;
// OUTPUT:
# Heading 1 Here