I am editing the thanks.html template and I wish to assign the {$member.login} to a php variable ($code). I entered the following, but get an error page. <?php $code = {$member.login}; echo strtoupper(substr(str_replace("\r\n","-",(chunk_split("$code",5))),0,-1)); ?> How can I do this correctly? Thank you, Goose
1. In order to use php inside smarty template you need to put code into these tags: {php}{/php} 2. To access template variable, need to use this: $this->_tpl_vars['varname']; So code should be: Code: {php} $code = $this->_tpl_vars['member']['login']; echo strtoupper(substr(str_replace("\r\n","-",(chunk_split("$code",5))),0,-1)); {/php}