eval功能不起作用

I would like to send some email at the end of a process, the html template is saved in a database with {var} (parenthesis to be replaced with variables). On one page, fetch the template from the DB, and with preg_replace's function replace parenthesis with $ and at the end use the eval's function, but this do not work.

//Variables
$var1= 'testo';
$var2= 'testo';
$var3= 'testo';
$var4= 'testo';
$var5= 'testo';

$email_template = mysqli_query($conn, "SELECT * FROM email_template WHERE email_type = 'nuova_prenotazione'");
$email_Data  = mysqli_fetch_array($email_template);

$title = $email_Data['email_subject'];
$message = $email_Data['email_message'];

$pattern = '/{(\w+)}/i';$replacement = "$$1";
$str = preg_replace($pattern, $replacement, $message );

eval("\$str = \"$str\";");

echo $str;

The preg_replace's function work perfect, but the variables stay $var, then the eval function do not work.