Skip to content

Instantly share code, notes, and snippets.

@githiro
Created June 15, 2013 08:39
Show Gist options
  • Select an option

  • Save githiro/5787419 to your computer and use it in GitHub Desktop.

Select an option

Save githiro/5787419 to your computer and use it in GitHub Desktop.
PHP: escape all in array function
function escapeAllInArray($array)
{
foreach ($array as $key => $value)
{
$array[$key] = htmlspecialchars($value, ENT_QUOTES, $charset);
}
return $array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment