count_sentences

1.0 1.1 1.2 1.3

Counts the sentences in a string

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

Examples

Example #1

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

The above example will output:

1
2