PHP code example of pagerange / metaparsedown
1. Go to this page and download the library: Download pagerange/metaparsedown 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/ */
pagerange / metaparsedown example snippets
php
use Pagerange\Markdown\MetaParsedown;
$mp = new MetaParsedown();
echo $mp->text($markdown); // prints HTML, without meta data
$meta = $mp->meta($markdown); // returns an array of key/value pairs
$bare_markdown = $mp->stripMeta($markdown); // returns markdown without yaml block