I'm using a service that I end up with a generated string. Strings are usually like:
Hello Mr John Doe, you are now registered \t.
Hello &nbsb; Mr John Doe, your phone number is &nbsb; 555-555-555 &nbs; \n
I need to remove all html entities and all \t and \n and etc.
I can use html_entity_decode, to remove none breaking spaces, and use str_replace for removing \t or \n, but is there a more general way? some thing that makes you sure nothing but alphabet characters exist in the string (some string that doesn't contain codes).