function cleanStringData(&$str) {
$str = preg_replace("/\t/", " ", $str);
$str = preg_replace("/\r?\n/", " ", $str);
$str = preg_replace("/,/", "|", $str);
}
$string = "this, is a valid string";
cleanStringData($string);
echo "--".$string;
No comments:
Post a Comment