i wan to remove all the *&^@%^#.... from a string, just want to keep the letters and number. eg: $str="test#@dd_22345(eer).."; i want it to be : "testdd22345eer" hope it's easy to understand, thanks
$str="test#@dd_22345(eer).."; $symbols = array("*","&","^","@","%","^","#"); $str = str_replace($symbols,"",$str); PHP: if there are additional symbols you want to filter add them to the $symbols array