count_words

1.0 1.1 1.2 1.3

Counts the words in a string

<?php
count_words(string $value)
  • value: the string to process

Examples

Example #1

index.tpl
{count_words('ab cd')}

The above example will output:

2