PHP code example of sugiphp / ste

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

    

sugiphp / ste example snippets





use SugiPHP\STE\Ste;

$tpl = new Ste();
// Load a file
$tpl->load(__DIR__"/index.html");
// or set a raw template from PHP $tpl->setTemplate($htmlTemplate);
// set a variable title
$tpl->assign("title", "My Site");
// sets several links at once - perfect for database results
$tpl->assign("navi", array(
	array("link" => "/blog", "title" => "My Blog"),
	array("link" => "http://gamegix.com", "title" => "Online games")
));
// parse the template
echo $tpl->parse();