Special characters remove from string - PHP
by satheeshkumar[ Edit ] 2012-06-27 12:46:17
Remove Special Character in String using PHP,
The following code is used to removes the special characters in a given string,
$var = "asd@#sdf$%()sdf*^=+|";
$rep = preg_replace('/[^a-zA-Z0-9_ -]/s', '', $var);
echo $rep;