Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 1... Zeile -...
1
nl2br {#language.modifier.nl2br}
-
 
2
=====
1
# nl2br
Zeile 3... Zeile 2...
3
 
2
 
4
All `"\n"` line breaks will be converted to html `<br />` tags in the
3
All `"\n"` line breaks will be converted to html `<br />` tags in the
5
given variable. This is equivalent to the PHP\'s
4
given variable. This is equivalent to the PHP\'s
Zeile -... Zeile 5...
-
 
5
[`nl2br()`](https://www.php.net/nl2br) function.
-
 
6
 
-
 
7
## Basic usage
-
 
8
```smarty
Zeile 6... Zeile 9...
6
[`nl2br()`](&url.php-manual;nl2br) function.
9
{$myVar|nl2br}
Zeile 7... Zeile 10...
7
 
10
```
8
 
-
 
9
    <?php
11
 
Zeile -... Zeile 12...
-
 
12
## Examples
-
 
13
 
10
 
14
```php
Zeile 11... Zeile 15...
11
    $smarty->assign('articleTitle',
15
<?php
Zeile 12... Zeile 16...
12
                    "Sun or rain expected\ntoday, dark tonight"
16
 
Zeile 13... Zeile 17...
13
                    );
17
$smarty->assign('articleTitle',
14
 
18
                "Sun or rain expected\ntoday, dark tonight"
15
    ?>
19
                );
Zeile 16... Zeile -...
16
 
-
 
17
       
20
 
Zeile 18... Zeile 21...
18
 
21
```
19
Where the template is:
22
 
20
 
-
 
21
 
23
Where the template is:
22
    {$articleTitle|nl2br}
24
 
23
 
25
```smarty
24
       
26
{$articleTitle|nl2br}
25
 
27
```