PHP code example of kcs / mjml
1. Go to this page and download the library: Download kcs/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/ */
kcs / mjml example snippets
$mjml = new Mjml\Mjml();
$rendered = $mjml->render('<mjml><mj-body><mj-text>Hello world!</mj-text></mj-body></mjml>');
echo $rendered; // Email-friendly HTML
sh
$ phpize
$ ./configure
$ make
$ make install
# in php.ini set extension=mjml.so or:
$ php -dextension=path-to-project/target/release/mjml.so <your php file>