Miscellany
public text v1 · immutable public function Template($path, $keywords_array)
{
if (is_file($path))
{
$template = file_get_contents($path);
if (is_array($keywords_array))
{
while (list($key, $val) = each($keywords_array))
{
$replace = '{'.$key.'}';
$template = str_replace($replace, $val, $template);
}
}
return $template;
}