Skip to content

Kirby 6.0.0

$field->nl2br()

Converts all line breaks in the field content to <br> tags.

$field->nl2br(): Field

Return type

Kirby\Content\Field

This method does not modify the existing $field object but returns a new object with the changes applied. Learn more →

Examples

<?= $page->subtitle()->nl2br() ?>