Re: [SMARTY] Truncate
| From: | Darryl Bleau | Date: | Thu, 30 Jan 2003 22:40:04 +0000 |
| Subject: | Re: [SMARTY] Truncate | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7429@lists.php.net to get a copy of this message | ||
Ahh nm it's just another case of RTFM...
{$array[loop].firstname|truncate:1:"":true}
...
Sorry for the wasted space.
Darryl Bleau wrote:
Using: {section name=loop loop=$array} {$array[loop].firstname|truncate:1:""} {$array[loop].lastname} {/section} To generate only the first character of the name, with the firstname and lastname being 'firstname' and 'lastname', gives back this: fi lastname Changing it to |truncate:0:"" gives this: lastname How can I just get the first character using truncate? Am I missing something? Thanks! Darryl Bleau-- Darryl Bleau, B.Sc CS, A+ Creative Director Submersion Corporation Submersion.com 1-780-608-1616