How can you remove a single or double character from a string in PHP?

Foofah

New member
I am working on a site where the user can register his business and has to use keywords for a tag-cloud. Now, I do not want to have single characters in a tag-cloud or even a double one. For example: "this is an example I made".

In the above case I would like to have "is", "an" and "I" filtered out.

How can this be easily achieved in PHP?
I know about the "str_replace" though (maybe I should have mentioned that). The thing is I don't feel like making an array with all the single and double lettered words as the list would be too long. There has to be a way where PHP can find and eliminate "x" and "xx", maybe with "preg_replace", but I can't figure it out.
 
Back
Top