Buat Template Email PHP

$variables = array();

$variables['name'] = "Robert";
$variables['age'] = "30";

$template = file_get_contents("template.html");

foreach($variables as $key => $value)
{
    $template = str_replace('{{ '.$key.' }}', $value, $template);
}

echo $template;
Rich Rabbit