PHP code example of antibodies-online / bootstrap-email

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

    

antibodies-online / bootstrap-email example snippets


$scss = new ScssCompiler();

// Create a DOM Document
$doc = new DOMDocument('1.0', 'UTF-8');
\libxml_use_internal_errors(true);
$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
\libxml_clear_errors();

$converter = new Compiler($scss);
$doc = $converter->convert($doc);
$html = $doc->saveHTML();

$scss = new ScssCompiler();
$converter = new Compiler($scss);
$html = $converter->compileHtml(<MY HTML STRING>);

$scss = new ScssCompiler();
$scss->setScssFile(<PATH TO YOUR CUSTOM SCSS FILE);
$scss->setScssHeadFile(<PATH TO YOUR CUSTOM HEAD SCSS FILE);
$converter = new Compiler($scss);
$html = $converter->compileHtml(<MY HTML STRING>);