PHP code example of scaleplan / templater

1. Go to this page and download the library: Download scaleplan/templater 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/ */

    

scaleplan / templater example snippets


$data = [
    [
        'name' = > 'Aleksandr',
        'image' = > '/img/photo.jpg',
        'link' = > '/users/12'
        'user_link_class' = > 'trash-user'
    ]
];

$page = new PQSkaTpl ('/templates/main.html');
echo (string) $page->setMultiData ($data, '.user');