Created
May 10, 2013 06:00
-
-
Save eddy8/5552664 to your computer and use it in GitHub Desktop.
PHP:html escape
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function html_escape($var) | |
{ | |
if (is_array($var)) | |
{ | |
return array_map('html_escape', $var); | |
} | |
else | |
{ | |
return htmlspecialchars($var, ENT_QUOTES); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment