Re: [SMARTY-DEV] Re: Var Templates
| From: | Paul Lockaby | Date: | Wed, 16 Apr 2003 20:29:50 +0000 |
| Subject: | Re: [SMARTY-DEV] Re: Var Templates | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1206@lists.php.net to get a copy of this message | ||
boots wrote:
$myvar = 'test'; $var1 = "hello $myvar welcome";Ok, there is an easy solution to this problem. I registered sprintf as a modifier in PHP. You make your config var like this: myvar = hello %s, welcome Then you just have your template do this: {assign var=value1 value="hello"} {$myvar|sprintf:$value1} Is that what you're talking about? -- Paul Lockaby paul@paullockaby.com http://www.paullockaby.com