git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@149903 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2004-01-27 16:01:45 +00:00
parent 7bb0a9c5db
commit e660313dda

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strip-tags">
<refnamediv>
@ -26,7 +26,7 @@
<note>
<para>
<parameter>allowable_tags</parameter> was added in PHP 3.0.13
and PHP 4.0b3.
and PHP 4.0b3. Since PHP 4.3.0, HTML comments are also stripped.
</para>
</note>
</para>
@ -36,10 +36,37 @@
<programlisting role="php">
<![CDATA[
<?php
$string = strip_tags($string, '<a><b><i><u>');
$text = '
<p>Test paragraph.</p>
<!-- Comment -->
Other text';
echo strip_tags($text);
echo "\n\n-------\n";
// allow <p>
echo strip_tags($text, '<p>');
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
Test paragraph.
Other text
-------
<p>Test paragraph.</p>
Other text
]]>
</screen>
</example>
</para>
<warning>