Hi,
I have the following function which does not strip everything i need.
[PHP]
function StripAll($value ) {
$value = preg_replace('/[\r\n\t]+/', '', $value);
$value = preg_replace("/[rn]+[st]*[rn]+/","n",$valu e);
$value = stripslashes($v alue);
$value = mysql_real_esca pe_string($valu e);
$value = trim($value);
$value = strip_tags($val ue);
$value = str_replace("," , "", $value);
$value = str_replace("." , "", $value);
$value = str_replace("'" , "", $value);
$value = str_replace(";" , "", $value);
$value = str_replace("&" , " ", $value);
$value = str_replace("(" , "", $value);
$value = str_replace(")" , "", $value);
return $value;
}
[/PHP]
This still leaves in rn , full stops and brackets any ideas what is wrong with the function?
Cheers,
Adam
I have the following function which does not strip everything i need.
[PHP]
function StripAll($value ) {
$value = preg_replace('/[\r\n\t]+/', '', $value);
$value = preg_replace("/[rn]+[st]*[rn]+/","n",$valu e);
$value = stripslashes($v alue);
$value = mysql_real_esca pe_string($valu e);
$value = trim($value);
$value = strip_tags($val ue);
$value = str_replace("," , "", $value);
$value = str_replace("." , "", $value);
$value = str_replace("'" , "", $value);
$value = str_replace(";" , "", $value);
$value = str_replace("&" , " ", $value);
$value = str_replace("(" , "", $value);
$value = str_replace(")" , "", $value);
return $value;
}
[/PHP]
This still leaves in rn , full stops and brackets any ideas what is wrong with the function?
Cheers,
Adam
Comment