PHP code example of crit / markdown

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

    

crit / markdown example snippets


php composer.phar 


Markdown\Markdown;

$html = Markdown::ToHTML("# Title\n\nParagraph 1\n\n- List Element 1\n- List Element 2\n\n");
$markdown = Markdown::FromHTML("<h1>Title</h1><p>Paragraph 1</p><ul><li>List Element 1</li><li>List Element 2</li></ul>");