str_replace
str_replace
Disemvoweling PHP Function
Tue, 04/07/2009 - 09:01 | by philipnorton42Disemvoweling 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: