how I can use str_ireplace or other functions to remove any characters but not letters,numbers or symbols that are commonly used in HTML as \[code\]: " ' ; : . - + =\[/code\]... etc. I also wants to remove /n, white spaces, tabs and other.I need that text, comes from doing ("textContent"). innerHTML in IE10 and Chrome, which a php variable are the same size, regardless of which browser do it.Therefore I need the same encoding in both texts and characters that are rare or different are removed.I try this, but it dont work for me:\[code\] $textForMatch=iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text); $textoForMatc = str_replace(array('\s', "\n", "\t", "\r"), '', $textoForMatch);\[/code\]$text contains the result of the function ("textContent"). innerHTML, I want to delete characters as ???3..