Below it is the htmlspecialchars_decode version.
function array_htmlspecialchars(&$input)
{
if (is_array($input))
{
foreach ($input as $key => $value)
{
if (is_array($value)) $input[$key] = array_htmlspecialchars($value);
else $input[$key] = htmlspecialchars($value);
}
return $input;
}
return htmlspecialchars($input);
}
function array_htmlspecialchars_decode(&$input)
{
if (is_array($input))
{
foreach ($input as $key => $value)
{
if (is_array($value)) $input[$key] = array_htmlspecialchars_decode($value);
else $input[$key] = htmlspecialchars_decode($value);
}
return $input;
}
return htmlspecialchars_decode($input);
}
use of array has enhanced my performance...thanks for posting such a useful information....
ReplyDeletePHP Programming
works great, thanks
ReplyDelete