PHP » GoLang |
login |
register |
about
|
nl2br(PHP 4, PHP 5, PHP 7) nl2br — Inserts HTML line breaks before all newlines in a string Description
string nl2br
( string
$string
[, bool $is_xhtml = TRUE
] )
Returns Parameters
Return ValuesReturns the altered string. Examples
Example #1 Using nl2br()
<?php The above example will output: foo isn't<br /> bar Example #2 Generating valid HTML markup using the
<?php The above example will output: Welcome<br> This is my HTML document Example #3 Various newline separators
<?php The above example will output: This<br /> is<br /> a<br /> string<br /> Changelog
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|