mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Fixed bug#54611 one functionality is left out
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@310543 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6370ba265f
commit
0cc8f380b3
1 changed files with 23 additions and 2 deletions
|
@ -15,7 +15,8 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <parameter>string</parameter> with '<br />' or
|
||||
'<br>' inserted before all newlines.
|
||||
'<br>' inserted before all newlines (<literal>\r\n</literal>,
|
||||
<literal>\n\r</literal>, <literal>\n</literal> and <literal>\r</literal>).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -54,7 +55,7 @@
|
|||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>using <function>nl2br</function></title>
|
||||
<title>Using <function>nl2br</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -84,6 +85,26 @@ echo nl2br("Welcome\r\nThis is my HTML document", false);
|
|||
<![CDATA[
|
||||
Welcome<br>
|
||||
This is my HTML document
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>Various newline seperators</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$string = "This\r\nis\n\ra\nstring\r";
|
||||
echo nl2br($string);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
This<br />
|
||||
is<br />
|
||||
a<br />
|
||||
string<br />
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue