PHP code example of yatsenkolesh / dot-js-php-render

1. Go to this page and download the library: Download yatsenkolesh/dot-js-php-render 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/ */

    

yatsenkolesh / dot-js-php-render example snippets


$doT = doT\doT::instance(DOCROOT.'/modules/Work/views/PR/Products/doT/option-content.php', 1); // or first code of template in first arg
$doT -> assign([
 'id' => 2,
 'options' => 'options-list'
]);
echo $doT-> render('option-content-tmpl'); //find in file id content or just content