Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
nl2br {#language.modifier.nl2br}
2
=====
3
 
4
All `"\n"` line breaks will be converted to html `<br />` tags in the
5
given variable. This is equivalent to the PHP\'s
6
[`nl2br()`](&url.php-manual;nl2br) function.
7
 
8
 
9
    <?php
10
 
11
    $smarty->assign('articleTitle',
12
                    "Sun or rain expected\ntoday, dark tonight"
13
                    );
14
 
15
    ?>
16
 
17
 
18
 
19
Where the template is:
20
 
21
 
22
    {$articleTitle|nl2br}
23
 
24
 
25
 
26
Will output:
27
 
28
 
29
    Sun or rain expected<br />today, dark tonight
30
 
31
 
32
 
33
See also [`word_wrap`](#language.modifier.wordwrap),
34
[`count_paragraphs`](#language.modifier.count.paragraphs) and
35
[`count_sentences`](#language.modifier.count.sentences).