Truncate

From: Date: Thu, 30 Jan 2003 22:37:44 +0000
Subject: Truncate
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7428@lists.php.net to get a copy of this message
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

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