PHP code example of bryonbean / mjml
1. Go to this page and download the library: Download bryonbean/mjml 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/ */
bryonbean / mjml example snippets
use Mjml\Factory;
use Mjml\Compiler;
$mjml = '
<mjml>
<mj-body>
<mj-section>
<mj-raw><p>Hello world</p></mj-raw>
</mj-section>
</mj-body>
</mjml>
';
$factory = new Factory();
$compiler = new Compiler($factory);
$compiler->compile($mjml, '/path/to/my/template');