svn: /phpdoc/en/trunk/reference/strings/functions/ nl2br.xml
| From: | Hannes Magnusson | Date: | Wed, 27 Apr 2011 08:45:13 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/strings/functions/ nl2br.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-8011@lists.php.net to get a copy of this message | ||
bjori Wed, 27 Apr 2011 08:45:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=310543
Log:
Fixed bug#54611 one functionality is left out
Bug: http://bugs.php.net/54611 (Open) one functionality is
left out
Changed paths:
U phpdoc/en/trunk/reference/strings/functions/nl2br.xml
Modified: phpdoc/en/trunk/reference/strings/functions/nl2br.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/nl2br.xml 2011-04-27 08:33:36 UTC (rev 310542)
+++ phpdoc/en/trunk/reference/strings/functions/nl2br.xml 2011-04-27 08:45:13 UTC (rev 310543)
@@ -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
@@ -87,6 +88,26 @@
]]>
</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>
</para>
</refsect1>