Skip to content

Instantly share code, notes, and snippets.

@ssmxgo
Created May 16, 2016 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssmxgo/5bface4a7606d5151dcd1be7d2763b3d to your computer and use it in GitHub Desktop.
Save ssmxgo/5bface4a7606d5151dcd1be7d2763b3d to your computer and use it in GitHub Desktop.
データベース等、多次元配列に対して可能な再帰的なアンエスケープ
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