|
[SMARTY] Truncate: msg#00452php.smarty.general
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 -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [SMARTY] rebuild_cache() - just a thought: 00452, Ferdinand Beyer |
|---|---|
| Next by Date: | Re: [SMARTY] Truncate: 00452, Darryl Bleau |
| Previous by Thread: | [SMARTY] rebuild_cache() - just a thoughti: 00452, Hoffman, Geoffrey |
| Next by Thread: | Re: [SMARTY] Truncate: 00452, Darryl Bleau |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |