Quickest way to replace a series of characters in a string
问题 I'm wondering what is the quickest way to replace certain characters in a string with nothing. I now have the following: $omschrijving = str_replace(")", "", str_replace("(", "", $line))); Is there a better way to do this? This is only replacing the "(" and ")" , but what if I want to do the same with more characters. Still learning the preg_ methods but it's still a bit of mind blowing at the moment. 回答1: Here you go: str_replace(array('a', 'b', 'c', 'd'), '', $sString); From the manual: The