note 45340 added to function.htmlspecialchars

From: Date: Thu, 02 Sep 2004 18:51:55 +0000
Subject: note 45340 added to function.htmlspecialchars
Groups: php.notes 
Request: Send a blank email to php-notes+get-75946@lists.php.net to get a copy of this message
heres a version of the recursive escape function that takes the array byref rather than byval so saves some resources in case of big arrays function recurse_array_HTML_safe(&$arr) { foreach ($arr as $key => $val) if (is_array($val)) recurse_array_HTML_safe($arr[$key]); else $arr[$key] = htmlspecialchars($val, ENT_QUOTES); } ---- Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45340 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45340&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45340&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75946) next »