php - i want to check array's data with mysql_real_escape_string() function -



php - i want to check array's data with mysql_real_escape_string() function -

this function create sql query array

function yorumekle($kitapid,$array) { $sql = "insert yorumlar ('" . implode(",",array_keys($array)) . "') values ( '" . implode("','",$array) . "' )"; }

but want utilize mysql_real_escape_string() how?

you can utilize array_map function

function yorumekle($kitapid,$array) { $array2 = array_map("mysql_real_escape_string",$array); $sql = "insert yorumlar ('" . implode("','",array_keys($array2)) . "') values ( '" . implode("','",$array2) . "' )"; }

php mysql arrays

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -