title: Smarty : evaluate a template stored in a PHP variable
body: <p>i have a php variable which has html/smarty code in it </p>
  
  <pre><code>$x='&lt;a href="{$link}" &gt;{$title}&lt;/a&gt;';
  </code></pre>
  
  <p>This data is fetched from database , i want to evaluate it using smarty and put the output into a php variable (to print it out or to save it to the database again) .</p>
  
  <p>Thanks</p>
  
  <p>Edit :</p>
  
  <p>i want the content of X to be evaluated using smarty , as if the content of x is stored in a file.tpl then $y=$smarty->fetch('file.tpl'); ... want to do it without the need to save the content of x into a file</p>