Created
May 16, 2016 02:15
-
-
Save ssmxgo/5bface4a7606d5151dcd1be7d2763b3d to your computer and use it in GitHub Desktop.
データベース等、多次元配列に対して可能な再帰的なアンエスケープ
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
if ( ! function_exists('stripslashes_deep')){ | |
function stripslashes_deep($value){ | |
//再帰的なstripslashes | |
$value = is_array($value) ? | |
array_map('stripslashes_deep', $value) : | |
stripslashes($value); | |
return $value; | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment