开发者

mysql_real_escape_string shortcut

i have an array with around 10 key values. which is the best way to add mysql_real_escape_string to all of them 开发者_如何学编程?


$escaped_array=array_map('mysql_real_escape_string',$array);

Look at array_map


You can create short-cut method.. something like this ..

function mres($v){
    return mysql_real_escape_string($v);
}

and you can use mres as a function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜