Re: concatenation operator...?

From: Date: Thu, 28 Jun 2001 14:56:10 +0000
Subject: Re: concatenation operator...?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1038@lists.php.net to get a copy of this message
On Thu, 28 Jun 2001, Andreas Heck wrote: > Hi, > > I want to do something like this: > > {$data.mednr|string_format:"%08d"} > > The count of trailing 0s should be variable > so I tried this: > > {$data.mednr|string_format:"%0 $config.length d"} > > But it doesn't work. Same as with the other tips > posted in this thread. > > Any ideas? Yes, put the whole format string into your variable and do: {$data.mednr|string_format:$config.format} -Andrei * Why is it always Segmentation's fault? *

« previous php.smarty.general (#1038) next »