Подсчитывает количество слов в переменной.
Пример 5.7. count_words
<?php $smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.'); ?>
Шаблон:
{$articleTitle} {$articleTitle|count_words}
Шаблон:
Dealers Will Hear Car Talk at Noon. 7
See also count_characters, count_paragraphs and count_sentences.