Forum Moderators: coopster
How to you output php in curly brackets
<?php
$template = 'Hello {User_name}, welcome to {PLACE}.';
$templateVars = array (
'User_name' => 'Bob',
'PLACE' => 'the machine',
);
$htm = $template;
foreach ($templateVars as $name => $value) {
$htm = str_replace('{'.$name.'}',$value,$htm);
}
echo $htm;
<?='User_name'?>