code: $search = array("[b]","[/b]","[u]","[/u]","[s]","[/s]","·#","·@","·'","·0"); for($i = 0; $i < count($search); $i++) { $string = str_replace($search[$i], "", $string); }