Back To Forum Post
Main Index
Predefined Functions
br2nl
Replaces HTML line breaks with newlines in a string
[...] = optional ... = your value
[var $... = ]call br2nl $val=... [;$is_xhtml=...]
If $is_xhtml=0
is also converted
Example code
<!--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-->
Show as text
Example output
Reload
foo bar foo bar
Related pages
nl2br
Quick index
abs
addslashes
base64_decode
base64_encode
bin2hex
br2nl
ceil
chr
crc32
dechex
floor
hex2bin
hexdec
htmlspecialchars
lcfirst
ltrim
md5
mt_rand
nl2br
ord
pi
pow
rawurldecode
rawurlencode
round
rtrim
sha1
str_ireplace
str_pad
str_repeat
str_replace
str_shuffle
strip_tags
stripos
stripslashes
stristr
strlen
strpos
strrchr
strrev
strripos
strrpos
strstr
strtolower
strtoupper
substr
trim
ucfirst
ucwords
urldecode
urlencode