Skip to content
Umakant Patil edited this page Aug 14, 2017 · 1 revision

Used to count the number of words in a variable.

Template:

{$articleTitle = 'Dealers Will Hear Car Talk at Noon.'}

{$articleTitle}
{$articleTitle|count_words}

output:

Dealers Will Hear Car Talk at Noon.
7

see also count_words in PHP Smarty documentation.

Clone this wiki locally