count_paragraphs

1.0 1.1 1.2 1.3

Counts the paragraphs in a string

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

Examples

Example #1

index.tpl
{count_paragraphs('ab cd')}
{count_paragraphs('ab\n cd')}

The above example will output:

1
2