Re: [SMARTY] Variables in variables
| From: | Bertrand DUNOGIER | Date: | Mon, 04 Nov 2002 14:56:16 +0000 |
| Subject: | Re: [SMARTY] Variables in variables | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6321@lists.php.net to get a copy of this message | ||
MD> php:
MD> <?php
MD> $tpl->assign('NAME', "Santa");
MD> ...
MD> ?>
MD> template:
MD> <html>
MD> ...
MD> Hello {$NAME}, nice to meet you again
MD> ...
MD> <html>
MD> output:
MD> <html>
MD> ...
MD> Hello Santa, nice to meet you again
MD> ...
MD> </html>
Isn't it ok ?
Otherwise, if you really want to create a variable, check the {capture}
function.
Bertrand