7th April 2009 - 2 minutes read time
Disemvoweling is a technique used on blogs and forums to censor any post or comment that contains spam or other unwanted text. It involves simply removing the vowels from the text so that it is almost, but not entirely, unreadable.
Use the following function to disemvowel a string of text.
function disemvowel($string)
{
return str_replace(array('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'), '', $string);
}
As an example, the first sentence on this post:
Disemvoweling is a technique used on blogs and forums to censor any post or comment that contains spam or other unwanted text.
would appear like this: