3.6. Function reference
3.6.10. countWords()
3.6.9. countSubstring()
« Previous
3.6.11. cycle()
Next »

3.6.10. countWords()

Referencemixed countWords(string $text [, $format [,$charlist ]])

Depending on the $format value (default is 0), the function:

$charlist may contain the list of characters that are considered as a word.

The simplest use:

<h1>{$article.title}</h1>
 
{$article.body}
 
<p>Words: {countWords($article.body)}</p>
3.6.10. countWords()
3.6. Function reference
« Previous
3.6.9. countSubstring()
Next »
3.6.11. cycle()