PHP Manual

PEAR Manual

Smarty Manual

PostgreSQL

MySQL Manual

Perl Manual

nl2br

all linebreaks will be converted to <br /> tags in the given variable. this is equivalent to the php nl2br() function.

example 5-13. nl2br

<?php

$smarty
->assign('articletitle',
                
"sun or rain expected\ntoday, dark tonight"
                
);

?>

where template is:

{$articletitle|nl2br}

this should output:

sun or rain expected<br />today, dark tonight

see also word_wrap, count_paragraphs and count_sentences.