logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript functions

br2nl

Replaces HTML line breaks with newlines in a string

Syntax

[var $... = ]call br2nl $val=... [;$is_xhtml=...]
If $is_xhtml=0
is also converted[...] optional · ... your value

Example

<!--parser:xtscript-->
var $input = foo<br />bar<br />foo<br>bar
var $output = call br2nl $val=$input ;$is_xhtml=0
print <pre>$output</pre>
<!--/parser:xtscript-->

Copy as text

Output reload

foo
bar
foo
bar

Related

nl2br

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top