PHP code example of cleaniquecoders / placeholdify
1. Go to this page and download the library: Download cleaniquecoders/placeholdify 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/ */
cleaniquecoders / placeholdify example snippets
use CleaniqueCoders\Placeholdify\PlaceholderHandler;
$template = "Hello {name}, your order #{orderNo} totaling {amount} has been confirmed.";
$content = PlaceholderHandler::process($template, [
'name' => 'John Doe',
'orderNo' => '12345',
'amount' => '$99.99'
]);
// Output: "Hello John Doe, your order #12345 totaling $99.99 has been confirmed."