{
if (is_array($str))
{
array_map(array('MYSQL_DB','escape_str'),$str);
else
{
if (get_magic_quotes_gpc()) {
$str = stripslashes($str);
if (!is_numeric($str)) {
$str = "'" . mysql_real_escape_string($str) . "'";
//echo $str.'<br />';
}
}
return $str;
}
Example:
$xt = array("' OR ''=''",'"abcdefg"');
print_r($db->escape_str($xt));
Outputs original array, not escaped!
Can anyone help with this? Thanks.