title: Use the smarty variable in smarty project php file
body: <p>I have a smarty project, in a <code>php</code> file, I set a <code>abc</code> variable:</p>
  
  <pre><code>$smarty-&gt;assign('abc', '123');
  </code></pre>
  
  <p>now I can use the <code>{$abc}</code> in its corresponding <code>.tpl</code> file.</p>
  
  <p>but now can I use the <code>abc</code> in php file?</p>
  
  <p>I tried <code>$smarty-&gt;abc</code> and <code>$smarty-&gt;$abc</code> all can not access.</p>
  
  <hr>
  
  <p><strong>EDIT-01</strong></p>
  
  <p>If I use </p>
  
  <pre><code>$smarty-&gt;assign('abc', '1234');
  $abc2 = $smarty-&gt;get_template_vars('abc');
  </code></pre>
  
  <p>I will get bellow error:</p>
  
  <pre><code>Fatal error: Uncaught Error: Using $this when not in object context in /Users/sof3/Desktop/smarty-test02/php/test.php:36 Stack trace: #0 {main} thrown in /Users/sof3/Desktop/smarty-test02/php/test.php on line 36
  </code></pre>