Demonstrate with an example how to allow more than one tag

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@230778 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Etienne Kneuss 2007-02-25 20:26:36 +00:00
parent 23d8a0039e
commit 94b7d99d01

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- $Revision: 1.13 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strip-tags">
<refnamediv>
@ -55,12 +55,12 @@
<programlisting role="php">
<![CDATA[
<?php
$text = '<p>Test paragraph.</p><!-- Comment --> Other text';
$text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// Allow <p>
echo strip_tags($text, '<p>');
// Allow <p> and <a>
echo strip_tags($text, '<p><a>');
?>
]]>
</programlisting>
@ -68,7 +68,7 @@ echo strip_tags($text, '<p>');
<screen>
<![CDATA[
Test paragraph. Other text
<p>Test paragraph.</p> Other text
<p>Test paragraph.</p> <a href="#fragment">Other text</a>
]]>
</screen>
</example>