PHP code example of g737a6b / php-r2-template
1. Go to this page and download the library: Download g737a6b/php-r2-template 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/ */
g737a6b / php-r2-template example snippets
$R2Template = new R2Template\R2Template("./templates");
$R2Template->set("var1", "foo");
$R2Template->set("var2", "bar");
$R2Template->display("echo_vars.php"); // foo bar
json
{
"a6b/php-r2-template": "*"
}
}
sh
docker run -it --rm -v $(pwd):/app -w /app php:8.3 ./vendor/bin/php-cs-fixer fix ./src