note 106238 added to function.strip-tags

From: Date: Thu, 20 Oct 2011 16:40:44 +0000
Subject: note 106238 added to function.strip-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-184019@lists.php.net to get a copy of this message
The following is an easy way to use strip_tags() with a simple array or a multidimensional array. <?php function strip_tags_array($data, $tags = null) { $stripped_data = array(); foreach ($data as $value) { if (is_array($value)) { $stripped_data[] = strip_tags_array($value, $tags); } else { $stripped_data[] = strip_tags($value, $tags); } } return $stripped_data; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 12.90.248.238 ---- Manual Page -- http://www.php.net/manual/en/function.strip-tags.php Edit -- https://master.php.net/note/edit/106238 Del: integrated -- https://master.php.net/note/delete/106238/integrated Del: useless -- https://master.php.net/note/delete/106238/useless Del: bad code -- https://master.php.net/note/delete/106238/bad+code Del: spam -- https://master.php.net/note/delete/106238/spam Del: non-english -- https://master.php.net/note/delete/106238/non-english Del: in docs -- https://master.php.net/note/delete/106238/in+docs Del: other reasons-- https://master.php.net/note/delete/106238 Reject -- https://master.php.net/note/reject/106238 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184019) next »