Files
doc-fr/reference/strings/functions/nl2br.xml
T
Mehdi Achour 2e19fe60f4 sync with en
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@157321 c90b9560-bf6c-de11-be94-00142212c4b1
2004-04-27 23:16:23 +00:00

78 lines
2.0 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- EN-Revision: 1.4 Maintainer: didou Status: ready -->
<refentry id="function.nl2br">
<refnamediv>
<refname>nl2br</refname>
<refpurpose>
Insère un retour à la ligne HTML à chaque nouvelle ligne
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>nl2br</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
</methodsynopsis>
<para>
<function>nl2br</function> retourne <parameter>string</parameter>
après avoir inséré '&lt;br /&gt;' devant toutes les nouvelles lignes.
</para>
<note>
<para>
Depuis &php; 4.0.5, <function>nl2br</function> est désormais compatible
XHTML. Toutes les versions antérieures à 4.0.5 retourneront
l'argument <parameter>string</parameter> avec '&lt;br&gt;' inséré
devant les nouvelles lignes, au lieu de '&lt;br /&gt;'.
</para>
</note>
<para>
<example>
<title>Exemple avec <function>nl2br</function></title>
<programlisting role="php">
<![CDATA[
<?php
echo nl2br("foo n'est pas\n bar");
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
foo n'est pas<br />
bar
]]>
</screen>
</example>
</para>
<para>
Voir aussi
<function>htmlspecialchars</function>,
<function>htmlentities</function>,
<function>wordwrap</function> et
<function>str_replace</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->