PHP code example of sarah-systems / ci4smarty
1. Go to this page and download the library: Download sarah-systems/ci4smarty 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/ */
sarah-systems / ci4smarty example snippets
\CI4Smarty\view('template.tpl');
use function CI4Smarty\view as view;
view('template.tpl');
view('template');
$data = [ 'apple' , 'banana' , 'lemon' ];
view('template',$data);
use CI4Smarty\Config\Services;
$time = date('Y-m-d H:i:s');
$smarty = Services::smarty();
$smarty->assign('time',$time);
$smarty->display('template.tpl');