From e660313dda339b6c6e2d7e31c11f70896c27d924 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 27 Jan 2004 16:01:45 +0000 Subject: [PATCH] fix #27021 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@149903 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/strip-tags.xml | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/reference/strings/functions/strip-tags.xml b/reference/strings/functions/strip-tags.xml index 424c16db5f..baf67ea427 100644 --- a/reference/strings/functions/strip-tags.xml +++ b/reference/strings/functions/strip-tags.xml @@ -1,5 +1,5 @@ - + @@ -26,7 +26,7 @@ allowable_tags 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. @@ -36,10 +36,37 @@ '); +$text = ' +

Test paragraph.

+ +Other text'; + +echo strip_tags($text); + +echo "\n\n-------\n"; + +// allow

+echo strip_tags($text, '

'); ?> + ]]> + + The above example will output: + + +Test paragraph.

+ +Other text +]]> +