wordwrap

1.0 1.1 1.2 1.3

Wraps a text at the given line length

<?php
wordwrap(string $value, [ int $length = 80, [ string $break = "\n", [ bool $cut = false ]]])

Examples

Example #1

index.tpl
{wordwrap "abcdefghijklmnopqrstuvwxyz" 8 cut=true}

The above example will output:

abcdefgh
ijklmnop
qrstuvwx
yz