Skip to content
Umakant Patil edited this page Aug 14, 2017 · 3 revisions

Used to count the number of characters in a variable.

Parameter Position Type Required Default Description
1 boolean No false This determines whether or not to include white-space characters in the count.

Template:

{$articleTitle = 'Cold Wave Linked to Temperatures.'}

{$articleTitle}
{$articleTitle|count_characters}
{$articleTitle|count_characters:true}

output:

Cold Wave Linked to Temperatures.
29
33

see also count_characters in PHP Smarty documentation.

Clone this wiki locally