title: Use a Regex to convert Smarty syntax to PHP syntax
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5299498/php-templating-using-custom-code-replacing-using-regex">PHP templating using custom code replacing using regex</a>  </p>
  </blockquote>
  
  
  
  <p>Hi, </p>
  
  <p>I would like to convert </p>
  
  <pre><code>&lt;a href="{$game.url}"&gt;{$game.info.cleanname}&lt;/a&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;a href="$game['url']"&gt;$game['info']['cleanname']&lt;/a&gt;
  </code></pre>
  
  <p>using preg_replace</p>