多维数组特殊字符的转义函数
摘要:
1 function _addslashes($arr){ 2 foreach($arr as $k=>$v){ 3 if(is_string($v)){ 4 $arr[$k]=addslashes($v); 5 }elseif(is_array($v)){ 6 $arr[$k]=_addslashes($arr); 7 } 8 } 9 return $arr;10 }这个函数可以用来将多维数组中的特殊字符进行转义输出 阅读全文
posted @ 2013-08-17 20:04 二月飞 阅读(250) 评论(0) 推荐(0) 编辑