colder Sun Feb 25 20:26:36 2007 UTC
Modified files:
/phpdoc/en/reference/strings/functions strip-tags.xml
Log:
Demonstrate with an example how to allow more than one tag
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/strings/functions/strip-tags.xml?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/en/reference/strings/functions/strip-tags.xml
diff -u phpdoc/en/reference/strings/functions/strip-tags.xml:1.12
phpdoc/en/reference/strings/functions/strip-tags.xml:1.13
--- phpdoc/en/reference/strings/functions/strip-tags.xml:1.12 Thu Feb 1
00:46:02 2007
+++ phpdoc/en/reference/strings/functions/strip-tags.xml Sun Feb 25
20:26:36 2007
@@ -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 @@
<screen>
<![CDATA[
Test paragraph. Other text
-<p>Test paragraph.</p> Other text
+<p>Test paragraph.</p> <a href="#fragment">Other text</a>
]]>
</screen>
</example>