How to find and convert strings that are using curly brackets {site_name} for example in a HTML textarea output?
<p>I am designing a Mail Template editor in my application. I need an idea to find the occurance of specific variables to be able to convert them using preg_replace or preg_match in my code.</p>

<p>For example, my template looks like this: (Sample only) this is what is returned from the textarea variable.</p>

<pre><code>&lt;p&gt;Thank you for your order at &lt;a href="{site_url}" style="color:#ea6ea0"&gt;{site_name}&lt;/a&gt;.&lt;/p&gt;
</code></pre>

<p>In this example, I would like to replace the {site_url} with a specific variable or code from PHP since I can't parse PHP directly into the textarea.</p>

<p>Hope my question was clear, any help appreciated.</p>

<p><strong>Edit: Is my question clear? I need to replace the {} strings using my own php code. The php code cann't be used in textarea directly. That is why i need to find a templating system that replace predefined variables {... } but convert them using php when interpreting the template.</strong></p>
