count_words

÷ÏÚ×ÒÁÝÁÅÔ ËÏÌÉÞÅÓÔ×Ï ÓÌÏ×.

Пример 5-7. count_words

index.php:

$smarty = new Smarty;
$smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.');
$smarty->display('index.tpl');

index.tpl:

{$articleTitle}
{$articleTitle|count_words}

OUTPUT:

Dealers Will Hear Car Talk at Noon.
7