PHP code example of tilson / md2html-html2md

1. Go to this page and download the library: Download tilson/md2html-html2md 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/ */

    

tilson / md2html-html2md example snippets


use Tilson\Md2htmlHtml2md\Md2HtmlHtml2MdConverter;

$md = "**teste**";
(new Md2HtmlHtml2MdConverter())->toHtml($md);
//output: <p><strong>teste</strong></p>

//==================================================

$html = "<p><strong>teste</strong></p>";
(new Md2HtmlHtml2MdConverter())->toMarkdown($html);
//output: **teste**