i know that on stack, exists a lot of questions related to this.. but i didnt found my answer
Im trying to create a function that returns an array of POST values. and i'm getting error on an array map:
function clean_the_data ($data) {
if ( is_array($data) ) {
$data = array_map("trim", $data);
if (get_magic_quotes_gpc()) { $data = array_map("stripslashes", $data); }
$data = array_map($data, array($this->mysqli(), 'real_escape_string'));
}else{
$data = trim($data);
$data = stripslashes($data);
$data= $this->mysqli->real_escape_string($data);
}
return $data;
}
In the line
$data = array_map($data, array($this->mysqli(), 'real_escape_string'));
Im not getting this...
thanks for your time