note 62705 added to function.strip-tags

From: Date: Tue, 07 Mar 2006 19:44:53 +0000
Subject: note 62705 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-105012@lists.php.net to get a copy of this message
Here is a recursive function for strip_tags like the one showed in the stripslashes manual page. <?php function strip_tags_deep($value) { return is_array($value) ? array_map('strip_tags_deep', $value) : strip_tags($value); } // Example $array = array('<b>Foo</b>', '<i>Bar</i>', array('<b>Foo</b>', '<i>Bar</i>')); $array = strip_tags_deep($array); // Output print_r($array); ?> ---- Server IP: 200.59.45.3 Probable Submitter: 201.216.206.193 (proxied: 192.168.1.168) ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strip-tags.php Edit -- http://master.php.net/note/edit/62705 Del: integrated -- http://master.php.net/note/delete/62705/integrated Del: useless -- http://master.php.net/note/delete/62705/useless Del: bad code -- http://master.php.net/note/delete/62705/bad+code Del: spam -- http://master.php.net/note/delete/62705/spam Del: non-english -- http://master.php.net/note/delete/62705/non-english Del: in docs -- http://master.php.net/note/delete/62705/in+docs Del: other reasons-- http://master.php.net/note/delete/62705 Reject -- http://master.php.net/note/reject/62705 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105012) next »