Re: How to assign the formatted values ?
Arjan Scherpenisse EYEFI <[email protected]> Mon, 14 Nov 2005 20:56:21 +0100
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
First of all, you're better off using the regular smarty mailing list
(smarty-general) for these kind of questions.
I'm not sure if you can use modifiers in an assign statement. There is
another way to retrieve similar results, using a {capture} block:
{capture
assign="page_load_seconds"}{$page_load_time|string_format:"%.4f"}{/capture}
regards,
Arjan
James Mao said the following on 14-11-2005 15:47:
> Hi,
>
> I have a variable $page_load_time, and with value = 1.7123445
> and in template i wrote:
> {assign var="page_load_seconds",
> value=$page_load_time|string_format:"%.4f"}
>
> but {$page_load_seconds} output nothing, what's wrong here?
>
> Anyone can help me ?
>
> Thanks,
> james.
>
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php