Re: [SMARTY] Assign & functions
| From: | Manfred 'dwerg' Stienstra | Date: | Thu, 05 Sep 2002 18:17:17 +0000 |
| Subject: | Re: [SMARTY] Assign & functions | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5942@lists.php.net to get a copy of this message | ||
On Thursday 05 September 2002 10:21, Nichlas Lofdahl wrote:
> Is it possible to do something like this with smarty?
>
> {assign var="len" value=strlen($string)}
http://smarty.php.net/manual/en/language.modifier.count.characters.html
count_characters
This is used to count the number of characters in a variable.
Example 5-3. count_characters
{$articleTitle}
{$articleTitle|count_characters}
OUTPUT:
Cold Wave Linked to Temperatures
32
Manfred