1. Go to this page and download the library: Download playsms/tpl 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/ */
playsms / tpl example snippets
= 'THE DATA HERE';
$loops = array(
'lines' => array(
array('color' => 'Red', 'hexcode' => '#FF0000'),
array('color' => 'Green', 'hexcode' => '#00FF00'),
array('color' => 'Blue', 'hexcode' => '#0000FF'),
),
);
$tpl = new \Playsms\Tpl;
$tpl->setTemplate('./templates/test6.html');
$tpl->setVars(array(
'title' => 'THE TITLE HERE',
'content' => 'THE CONTENT HERE',
))
->setLoops($loops)
->setInjects(array('data'));
$tpl->compile();
echo $tpl->getCompiled();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.