Pass Variables or Variable Place-Holder from Editor to PHP

You should use str_replace, which accepts arrays as arguments:

$content = "Email: {{email}}\nFirst Name: {{first_name}}";
$body = str_replace(
    ['{{email}}', '{{first_name}}'],
    ['[email protected]', 'Mickey Mouse'],
    $content
);

Be careful about using $ in your placeholders. Since it’s widely used in PHP, it’s not safe. It was the reason I’ve used mustache-like syntax in my example.