PHP code example of crodas / simple-view-engine

1. Go to this page and download the library: Download crodas/simple-view-engine 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/ */

    

crodas / simple-view-engine example snippets




// By defualt its content will be print
Templates::get("if.tpl.php")->render(["name" => "cesar", "age" => 25]);

// but it can buffered as well
$buffer = Templates::get("if.tpl.php")->render(["name" => "cesar", "age" => 25], true);
echo $buffer;